Boost logo

Boost :

Subject: Re: [boost] [config] Positive feature macros, r2
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-01-25 17:08:03

On 01/25/18 19:51, Peter Dimov via Boost wrote:
> I'd like to revisit the topic of Boost.Config feature macros,
> specifically that in my opinion, positive feature macros
> (BOOST_CXX17_FEATURE) make more sense than negative macros
> (BOOST_NO_CXX17_FEATURE) in the current environment.
> Negative macros made sense in the past when they signified bugs and
> deficiencies in the compiler as measured against a static standard.
> Nowadays, the standard, such as it is, is in constant motion and macros
> indicate merely a current state of development for both the compiler and
> the standard.
> The arguments for positive macros are the same as last time:
> - adding a new negative macro requires changes to all legacy compilers
> that do not and will never implement the feature; a positive macro only
> requires changes to active compilers.
> - positive macros are a better match for the standard feature macros,
> which are positive. When we see a standard feature macro being set, we
> typically would set ours as well. This means that the amount of changes
> required to add a new macro is further reduced; we only need to touch
> compiler-specific config files if the compiler either does not implement
> feature macros, or sets them incorrectly (in our considered opinion.)
> TL;DR we should switch to positive feature macros in Boost.Config, and
> delaying this switch just accumulates more unnecessary code in
> Boost.Config.

My opinion hasn't changed since the last discussion - if we move to
positive macros then please convert all existing macros as well. I
wouldn't want to remember which one is positive or negative.

Boost list run by bdawes at, gregod at, cpdaniel at, john at