3 ms·
To be honest there are ways to make that much nicer. I believe that if you use recursive macros using the VA_OPT feature, you should be able to provide enumerat
by SuperV1234 5mo ago
To be honest there are ways to make that much nicer. I believe that if you use recursive macros using the VA_OPT feature, you should be able to provide enumerators directly to define enum as a list.
The underlying machinery implementation is going to be much uglier and complex, though.
See https://www.scs.stanford.edu/~dm/blog/va-opt.html https://www.scs.stanford.edu/~dm/blog/va-opt.html
- spacechild1 5mo agoOh, I didn't know about __VA_OPT__(), thanks for that! That looks much nicer indeed, but I still vastly prefer the other solutions, simply because I can just declare regular enums.