
On Thu, Dec 19, 2024 at 10:27 AM Peter Dimov via Boost
Chuanqi Xu wrote:
But another concern is, given boost (or any other library) should be accepted by other compilers and older clang. Then how could we put `export` in the sources directly? Didn’t we have to use yet another macro to handle this?
That's a good point, yes. Since in pre-20 mode we have to remove the `export` anyway, there's perhaps not much point in having ignorable `export`.
Or... maybe there still is, because we could at least use a single Config macro BOOST_CXX20_EXPORT, instead of separate ones per library.
Just a thought from the peanut gallery here... Was it ever discussed to partially preprocess the sources to generate a modules-only distribution without #includes and with only imports? Still single-source, with macros and such (which is a burden for maintainers), but generating a "cleaned-up" modules-only source package for those who want to opt in to modules. Kind of like a module-based Boost 2.0 but without it being a fork. And pushing it a little further, preprocess out pre-C++20 compiler workarounds too—why not? If this was discussed, I missed it on the mailing list. But perhaps it's too preposterous to even be discussed. :) --DD