Reputation: 769
Multiple talks have taught me that we can import <standardheaders>
, but this does not seem to work at all in Compiler Explorer. In latest Clang and GCC, I just get errors, and when googling for this, I see some Microsoft documents that say it's doable, but they seem very non-standard in their approach, regrouping the headers in some vendor-specific way.
What gives?
Will we be able to do this? or it is never gonna happen in a standard way? Is it dependent on a build system doing it for us individually even though they are standard headers? Was this a planned feature that was dropped? Or was it always planned to be highly vendor specific and non-standardized, and to require a build system even for standard headers? Is there a plan to standardize at least the division of standard features so that we don't have a bunch of different vendor specific organization schemes that are different than the header scheme?
Upvotes: 0
Views: 333
Reputation: 238281
The proposal to make standard headers importable as synthesized header units is P1502.
STL says in MSVC's issue that it is feature complete for VS 2019 16.10 Preview 2.
Neither GCC documentation nor Clang documentation list their current status for P1502, but support for modules in general is "partial".
Will we be able to do this?
Presumably when the compiler / standard library implementers get to it. Until then, we can safely use #include
which doesn't have drawbacks compared to synthesized header units.
Upvotes: 4