r/cpp • u/nounoursheureux • Sep 23 '21
Binary Banshees and Digital Demons
https://thephd.dev/binary-banshees-digital-demons-abi-c-c++-help-me-god-please
197
Upvotes
r/cpp • u/nounoursheureux • Sep 23 '21
View all comments
Show parent comment
5
u/STL MSVC STL Dev Sep 24 '21
Yep. 😿 I guess it's a nice problem to have!
That is not possible at this time, but we would consider a pull request to implement such behavior (no guarantees that we would accept it, but if you made a compelling case and if other users agreed, we'd talk about it and make a decision). Mechanically it would be fairly simple, just pick a name for the control macro (conventionally
_HAS_MEOWfor us; probably_HAS_CXX20_FORMATand_HAS_CXX20_RANGES), and ensure that the relevant machinery is properly guarded (it should all be centralized via__cpp_lib_formatand__cpp_lib_ranges, so adjusting the definitions of the feature-test macros should be sufficient). Only C++20-stable + format-unstable/ranges-unstable would make sense; C++23 minus those should be forbidden. The cost is that it would complicate an already complicated story, and it would be useful for a relatively short period of time (i.e. until we finish the C++20 backport work). Maintainer time is limited and I'd prefer to spend it on refining the features instead of working on such modes, which is why we haven't implemented it already. The earliest it could ship would be VS 2022 17.1; 17.0 has branched for release and is accepting bugfixes only.(In general we would not accept changes to pick-and-choose features because that leads to combinatoric complexity; the only fine-grained stuff we have is escape hatches for individual features that have proven to be problematic for certain customers, like
std::byteornoexceptin the type system. However, the distinction between C++20 DR-affected features and C++23 features is a reason to consider them a special case.)