Closed ddevienne closed 3 years ago
There is unfortunately a limit of 24 in https://github.com/pdimov/describe/blob/eea288e04961374721020b5454707590815b2fcf/include/boost/describe/detail/pp_for_each.hpp, yes. You're right that it needs to be documented (after being increased appropriately).
Since I'm code-generating this, could there be lower-level macros I could use and combine, to not be limited to 24 in the single friendly macro? Something like a BEGIN_ENUM, ADD_ENUM x times, END_ENUM?
That would be possible too, I suppose. BOOST_DESCRIBE_ENUM_BEGIN(E), BOOST_DESCRIBE_ENUM_IMPL(E, e) x N, BOOST_DESCRIBE_ENUM_END(E). I'm not going to make these part of the documented interface though. :-)
I don't want to make changes while the review is ongoing, though, as judging by past experience reviewers often don't like this, even though the master branch would remain stable.
The limit is 52 now, and there are _BEGIN, _ENTRY, _END (undocumented) macros.
I'm updated to the latest, and all my enums are OK now. No new issues or warnings on VS 2019 or GCC 9.1. Thanks.
Started integrating Boost.Describe in my code generator (as discussed on the Boost ML).
Works on all my enums, except the largest with 27 enumerators. If I reduce the described enumerators to 24, then it's OK. (I didn't change the enum, my code would not compile anymore, just omitted a few enumerators in the DESCRIBE macro).
Is there a preprocessor limit that needs to be increased? Aren't native variadic macros unlimited in number of arguments? What's one supposed to do in this case?
No mention to that limit in https://pdimov.github.io/describe/doc/html/describe.html#implementation_limitations