I came up with this idea:
Boost.Config provides header files for each library feature (i.e. one header
per one feature), but does not include those headers.
When users need a macro, the corresponding header needs to be included.
Feature detection macros are provided as follows:
[1]
In traditional stdlib headers (i.e. ),
macros `BOOST_OPTOUT_SOME_FEATURE` and `BOOST_OPTIN_SOME_FEATURE` are defined
if necessary:
`BOOST_OPTOUT_SOME_FEATURE`
If library feature is broken even if SD-6 macro is defined,
we define the macro to opt-out the feature.
`BOOST_OPTIN_SOME_FEATURE`
If library feature is implemented even if SD-6 macro is not defined,
we define the macro to opt-in the feature.
[2]
Then, Boost.Config provides as
#include <xxxx> // the corresponding std header
#include
#if (__cpp_lib_some_feature < YYYYMM || defined(BOOST_OPTOUT_SOME_FEATURE)) \
&& !defined(BOOST_OPTIN_SOME_FEATURE)
#define BOOST_NO_CXX_LIB_SOME_FEATURE
#endif
Another option would be, if someone volunteers, asking the standard committee
for a new standard header ;)
Regards,
Michel