Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2021-03-11 16:21:00


Alexander Grund wrote:
> E.g. you also disabled the enum stuff although it works just fine:
> https://github.com/pdimov/describe/blob/eea288e04961374721020b54547
> 07590815b2fcf/include/boost/describe/enum.hpp#L12
> https://godbolt.org/z/n3foGn

The problematic case is BOOST_DEFINE_ENUM(A), which I actually don't
handle properly even on newer compilers. It only compiles because of
another problem - that a trailing comma is silently accepted and produces
an invalid descriptor. BOOST_DEFINE_ENUM_CLASS(A) fails, and so will the
enum one, once I unify the two macros.

> This could be avoided if you would have used
> BOOST_NO_VARIADIC_EXPAND_FEATURE (or so) which would allow to see,
> that this feature is not used for the enum case.

It's not used, but by mistake. :-)

> I'm also actually surprised, that it works on MSVC without ##__VA_ARGS__ .
> I though their preprocessor is now standards conformant...?

MSVC implicitly does the ## thing without being told. Their newer preprocessor,
enabled with /Zc:preprocessor, does not (as pointed out by Edward Diener), but
it supports the ## extension.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk