
Chuanqi Xu wrote:
For authors of libraries, after boost introduce modules, you only need to do 2 extra things: - In headers, add a macro (assume its name as BOOST_MODULE_EXPORT, which will be ‘export’ conditionally) to the entities that need to be exported. - In headers, include standard headers and other dependent headers conditionally so that we don’t include anything if the headers are in a module unit. e.g., https://github.com/boostorg/pfr/blob/f09e6aeae9d050897fff72b93d5f5e866cc5e11...
For a header-only library with no dependencies, you can basically do whatever
you like, but in the general case you'd have something like
#ifdef BOOST_USE_MODULE_CORE
import boost.core;
#else
#include