Closed jwakely closed 9 months ago
The macros have been updated to prevent the use of reserved names.
Thank you for your valuable suggestion!
Nice, thanks!
Commit d9189b4 didn't fix the issue. The new names (for example, _VLA_HEADER_DYNARRAY_HPP_
) still have leading underscores.
Right, that's just as bad (I didn't check the actual code, just assumed what was said here was correct).
The problem is not that the names don't end in "HPP" it's that the start with an underscore followed by an uppercase letter. _VLA_DYNARRAY
is bad, VLA_DYNARRY
is good. If you want so use XXX_HEADER_XXX_HPP
that's fine, but it can't use a leading underscore.
Truely sorry about that. Please try the new version, I have now deleted the underscores at the beginning of the macros.
https://github.com/cnbatch/dynarray/blob/7d86b2f743d3edb1009d24953bab92539521b86c/dynarray.hpp#L55
_VLA_DYNARRY_
is a reserved name, which makes this header undefined according to the standard. There's no reason you need a leading underscore for that macro, you can just useVLA_DYNARRY
orVLA_DYNARRY_HPP_INCLUDED
or something like that.