
On Sun, Aug 23, 2020, 10:13 Mike via Boost <boost@lists.boost.org> wrote:
<...> I think the real problem is that - due to the structural differences it may not be possible to conditionally turn a header file into a module interface unit just with a bunch of #ifdefs in a convenient manner, and even if you could, code using boost modules could not coexist with code using boost headers.
I think that it is solvable. In each header put something like that in the beginning: #if defined(__cpp_modules) && !defined(BOOST_VARIANT_BUILD_MODULE) import boost.variant #else // include guards #ifndef BOOST_VARIANT_HPP #define BOOST_VARIANT_HPP #endif #endif Now `import boost.variant;` and `#include <boost/variant.hpp>` could coexist. Also all the users just gain the benefits of modules if compiler supports them.