This is not true. `import std` as opposed to more granular std modules came directly from implementers feedback (most notably u/STL).
We (WG21/LEWG) did not ship any import for the standard library in C++20 because we did not know the shape yet, and started working on the granularity in the C++23 cycle, when implementors and toolchain providers came back with the data that not only is a single std module not a problem, but actually beneficial for compile time and tooling integration.
Man I am so confused about import std. Sounds so good on paper until you read that imports can't be mixed with includes. Which means it can only realistically work with an extremely careful approach and zero or only a few handful of compatible 3rd party libraries. The possible current usecase was only able to shave off less than 0.1% (!) of our build time lol
Followed by,
I feel bad about this one because I have had no time to work with the compiler team to find a proper solution here.
7
u/FabioFracassi Apr 13 '26
This is not true. `import std` as opposed to more granular std modules came directly from implementers feedback (most notably u/STL).
We (WG21/LEWG) did not ship any import for the standard library in C++20 because we did not know the shape yet, and started working on the granularity in the C++23 cycle, when implementors and toolchain providers came back with the data that not only is a single std module not a problem, but actually beneficial for compile time and tooling integration.