|
#pragma warning(push) |
|
#pragma warning(disable : 5244) // '#include <meow>' in the purview of module 'std' appears erroneous. |
It seems the MSVC STL module works with clang++.exe (this is the driver with the GNU-like command-line interface, but targets the MSVC ABI). However, the module needs to have additional guards for Clang so that the same warnings of having #include <angle> and defining module std are suppressed. The core of it is:
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winclude-angled-in-module-purview"
#pragma clang diagnostic ignored "-Wreserved-module-identifier"
#endif
...
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
But I suspect we need to be much more judicious about the macro guards, because clang-cl.exe disguises itself as MSVC to source code, with the exception that __clang__ is also defined.
STL/stl/modules/std.ixx
Lines 39 to 40 in cbe2ee9
It seems the MSVC STL module works with
clang++.exe(this is the driver with the GNU-like command-line interface, but targets the MSVC ABI). However, the module needs to have additional guards for Clang so that the same warnings of having#include <angle>and definingmodule stdare suppressed. The core of it is:But I suspect we need to be much more judicious about the macro guards, because
clang-cl.exedisguises itself as MSVC to source code, with the exception that__clang__is also defined.