Boost logo

Boost :

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>),
if necessary:
  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
  #include <boost/config.hpp>
  #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, gregod at, cpdaniel at, john at