Hi,
C++20 modules seem to be a good tool to improve compile times and to hide
the implementation details of the libraries.
I've been looking throught the sources of {fmt} library. Looks like the fmt
library approach to C++20 modularization seems to fit Boost quite well.
How about adding the following macro to Boost:
* BOOST_BEGIN_MODULE_EXPORT - starts the scope of things to export if Boost
is build as a C++20 module
* BOOST_END_MODULE_EXPORT - ends the scope of things to export if Boost is
build as a C++20 module
* BOOST_MODULE_EXPORT - for a single entity export if Boost is build as a
C++20 module
As a result, if Boost is build as a module the above macros are defined in
the following way:
#define BOOST_MODULE_EXPORT export
#define BOOST_BEGIN_MODULE_EXPORT export {
#define BOOST_END_MODULE_EXPORT }
Helper macro BOOST_NO_CXX23_IMPORT_STD for detecting availability of
`import std` also seems useful.
Macro BOOST_NO_CXX20_MODULES - for notifying the libraries that compiler
does not support modules or Boost modules are not compiled.
With all the above macros the Boost libraries could look like:
/// header
#include