Hello,
I want to use the #error directive to limit the size of a statically allocated array during compilation (it must not exceed a certain limit, and I want to fail compilation, not startup, if it is too large), but I can only work with constant expressions, of course. Is there a way to do this...?
Thanks.
"I forgot to mention that the array can contain various types and I don't know in advance how many elements are in it."
Arrays hold elements of a single type. What do you mean by "the array can contain various types"? How are you implementing an array containing various types?