Subject: Re: [boost] [config] Positive feature macros, r2
From: Peter Dimov (lists_at_[hidden])
Date: 2018-01-25 18:54:13
John Maddock wrote:
> For compilers that are effectively "dead", we could just...
In principle, what I suggest is perfectly doable with negative macros too.
#if !defined(__cpp_foo) || __cpp_foo < 201400
# define BOOST_NO_CXX14_FOO
in prefix.hpp, then in the compiler-specific configs #undef the macros
instead of setting them. The only reason to prefer positivity is because
this way of doing things is what comes naturally when positive macros are
>From user point of view, I've always felt that
// use c++17 feature
reads better than the inverted test, but that's probably a matter of taste.
(This also degrades gracefully if one forgets the <config.hpp> include,
which may or may not be considered a feature. :-) )