Supporting import std; in C++20 · Issue #3945 · microsoft/STL (original) (raw)

Currently, we block the C++23 Standard Library Modules from being used in C++20 mode. There's no technical reason for this, it's purely a policy choice. Supporting import std; in C++20 mode would be easy (remove the block, add test coverage, it'll take me just a few minutes - at least in the toolset, then we'll need to talk to the build systems), because we don't need anything from the C++23 Core Language here. However, after granting this ability to users, we can never take it back.

Therefore, we're looking for cross-vendor agreement. Next Wednesday (2023-08-16), the MSVC STL maintainers will talk about this at our weekly scheduled meeting and I expect we'll agree that this is a reasonable thing to do. If the libc++ and libstdc++ maintainer teams could discuss this in their own channels and then add comments here saying "The libc++ maintainers want to support import std; in C++20 mode", then we can move forward together.

(This equally applies to import std.compat;, of course. It does not apply to any future modules that might be added to C++26 and beyond. Please note that we're not running a user survey here.)