On 05/04/2022 23:56, Peter Dimov via Boost wrote:
Niall Douglas wrote:
The compiler will automatically as-if do the above for you if Modules are enabled for standard library headers. It's clever enough to interpret an include as an import. So no need.
Right, but this part of the standard is optional. MSVC has it but not the others, right?
clang has it too.
Clang doesn't even seem to support `import <iostream>;` yet.
It's been a while since I last tried it, but clang has a structure of module maps and they indicate what is what. If libc++ aren't building <iostream> as a module, I assume they have good reason for that. Any automatic reinterpretation of #include into import has nothing to do with how good - or bad - the actual module implementation is, or what is supported and is not supported. To be honest, I think there's a few more years in it before considering Modules as usable across all three compilers. I definitely think we ought to await cmake build support as a sign that they are usable. Coroutines is similarly a while away yet from production stable across all three compilers. I still see unpleasant surprises from time to time. Niall