
On Tue, Oct 19, 2021 at 12:54 AM Julien Blanc via Boost
#if __cplusplus >= 201703L using filesystem = std::filesystem; #else using filesystem = boost::variant; #endif ... #if __cplusplus >= 201703L using string_view = std::string_view #else using string_view = boost::string_view #endif
This effectively creates 4 different libraries: { std::filesystem, std::string_view }, { boost::variant, std::string_view }, { std::filesystem, boost::string_view }, and { boost::variant, boost::string_view } I am transitioning away from header-only in favor of compiled libraries (or including the single-header definitions file src.hpp), to be responsive to user feedback that Boost libraries "take a long time to compile and use too many templates" (which sometimes, they do). Linking to compiled libraries increases the complexity and error rate of builds so the last thing I want to do is create multiple ABI forks of my libraries because of #ifdefs on types used in public interfaces, so this approach is a non-starter. Thanks