Boost logo

Boost :

Subject: [boost] [config] Positive feature macros, r2
From: Peter Dimov (lists_at_[hidden])
Date: 2018-01-25 16:51:31


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.


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