More details:
The old code had inline definitions of operator[], begin() and end() for C++, but if a type which wasn't declared yet were used then it caused a compile error:
error C2143: syntax error: missing ';' before '*'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2238: unexpected token(s) preceding ';'
and even with a forward declare it caused an error:
error C2036: 'MyTypeName *': unknown size
The C code were fine, but the generated header weren't very readable.
I introduced a macro for the array, and a templated implementation of the C++ case which solves the issue.
TL;DR: and made a fix for the failure
More details: The old code had inline definitions of operator[], begin() and end() for C++, but if a type which wasn't declared yet were used then it caused a compile error:
and even with a forward declare it caused an error:
The C code were fine, but the generated header weren't very readable.
I introduced a macro for the array, and a templated implementation of the C++ case which solves the issue.