boostorg / describe

A C++14 reflection library
https://boost.org/libs/describe
67 stars 24 forks source link

Number of parameters for BOOST_DESCRIBE_CLASS and BOOST_DESCRIBE_STRUCT #2

Closed eldiener closed 3 years ago

eldiener commented 3 years ago

You should be able to leave out the empty parentheses parameter completely for no base classes in the BOOST_DESCRIBE_CLASS and BOOST_DESCRIBE_STRUCT macros. OK, you do not want to rely on Boost PP and BOOST_PP_OVERLOAD, but you can steal the code for that from Boost PP and adjust your macro depending on the number of arguments passed to it. I think it would be more elegant. I assume that all compilers support variadic macros by now and all you need for your own internal version of BOOST_PP_OVERLOAD is variadic macro support.

eldiener commented 3 years ago

I will close this because if you leave out empty parentheses completely you would not know if this means empty base classes or empty members.