
Ruben Perez wrote:
3. Some libraries support configuration macros. For instance, Boost::throw_exception supports BOOST_NO_EXCEPTIONS. This is used by other Boost libraries to support builds that disable exceptions. In the current world, the end user defines BOOST_NO_EXCEPTIONS in their code, includes the library, and everything works. Using a scheme like the one I suggested requires the user to build all the Boost modules using BOOST_NO_EXCEPTIONS, which is more involved than what we have today.
BOOST_NO_EXCEPTIONS is not defined by the user. It's defined by Boost.Config when -fno-exceptions or an equivalent is used. Differing -std levels pose similar issues. E.g. mp11 defines some things only when -std=c++17 or higher. Not exported: https://github.com/boostorg/mp11/blob/43fd186a8eb5d2b3dcc04cde49092b5be2bc40... Would be exported: https://github.com/boostorg/mp11/blob/43fd186a8eb5d2b3dcc04cde49092b5be2bc40... The user doesn't define any macros to enable this; as with -fno-exceptions, it's detected automatically. https://github.com/boostorg/mp11/blob/43fd186a8eb5d2b3dcc04cde49092b5be2bc40...