BOOST_DESCRIBE_STRUCT and BOOST_DESCRIBE_CLASS reject unions with a static_assert, but they shouldn't.
However, once unions are allowed, all the examples need an is_class check added, because traversing all the described members of a union is guaranteed undefined behavior (because at most one is active.)
BOOST_DESCRIBE_STRUCT
andBOOST_DESCRIBE_CLASS
reject unions with astatic_assert
, but they shouldn't.However, once unions are allowed, all the examples need an
is_class
check added, because traversing all the described members of a union is guaranteed undefined behavior (because at most one is active.)https://lists.boost.org/Archives/boost/2021/11/252270.php