Subject: Re: [boost] [config] Configuring for C++14 and later library features.
From: Michel Morin (mimomorin_at_[hidden])
Date: 2015-04-24 10:07:29
I came up with this idea:
Boost.Config provides header files for each library feature (i.e. one header
per one feature), but <config.hpp> does not include those headers.
When users need a macro, the corresponding header needs to be included.
Feature detection macros are provided as follows:
In traditional stdlib headers (i.e. <config/stdlib/****.hpp>),
macros `BOOST_OPTOUT_SOME_FEATURE` and `BOOST_OPTIN_SOME_FEATURE` are defined
If library feature is broken even if SD-6 macro is defined,
we define the macro to opt-out the feature.
If library feature is implemented even if SD-6 macro is not defined,
we define the macro to opt-in the feature.
Then, Boost.Config provides <config/library_features/some_feature.hpp> as
#include <xxxx> // the corresponding std header
#if (__cpp_lib_some_feature < YYYYMM || defined(BOOST_OPTOUT_SOME_FEATURE)) \
Another option would be, if someone volunteers, asking the standard committee
for a new standard header <feature_macros> ;)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk