diff options
Diffstat (limited to 'libcxx/modules/std.cppm.in')
-rw-r--r-- | libcxx/modules/std.cppm.in | 75 |
1 files changed, 42 insertions, 33 deletions
diff --git a/libcxx/modules/std.cppm.in b/libcxx/modules/std.cppm.in index 6ce8e28..b8d8913 100644 --- a/libcxx/modules/std.cppm.in +++ b/libcxx/modules/std.cppm.in @@ -168,39 +168,48 @@ module; #include <version> // *** Headers not yet available *** -#if __has_include(<debugging>) -# error "please update the header information for <debugging> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<debugging>) -#if __has_include(<flat_map>) -# error "please update the header information for <flat_map> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<flat_map>) -#if __has_include(<flat_set>) -# error "please update the header information for <flat_set> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<flat_set>) -#if __has_include(<generator>) -# error "please update the header information for <generator> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<generator>) -#if __has_include(<hazard_pointer>) -# error "please update the header information for <hazard_pointer> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<hazard_pointer>) -#if __has_include(<linalg>) -# error "please update the header information for <linalg> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<linalg>) -#if __has_include(<rcu>) -# error "please update the header information for <rcu> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<rcu>) -#if __has_include(<spanstream>) -# error "please update the header information for <spanstream> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<spanstream>) -#if __has_include(<stacktrace>) -# error "please update the header information for <stacktrace> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<stacktrace>) -#if __has_include(<stdfloat>) -# error "please update the header information for <stdfloat> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<stdfloat>) -#if __has_include(<text_encoding>) -# error "please update the header information for <text_encoding> in headers_not_available in utils/libcxx/header_information.py" -#endif // __has_include(<text_encoding>) +// +// This validation is mainly to catch when a new header is added but adding the +// corresponding .inc file is forgotten. However, the check based on __has_include +// alone doesn't work on Windows because the Windows SDK is on the include path, +// and that means the MSVC STL headers can be found as well, tricking __has_include +// into thinking that libc++ provides the header. +// +#ifndef _WIN32 +# if __has_include(<debugging>) +# error "please update the header information for <debugging> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<debugging>) +# if __has_include(<flat_map>) +# error "please update the header information for <flat_map> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<flat_map>) +# if __has_include(<flat_set>) +# error "please update the header information for <flat_set> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<flat_set>) +# if __has_include(<generator>) +# error "please update the header information for <generator> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<generator>) +# if __has_include(<hazard_pointer>) +# error "please update the header information for <hazard_pointer> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<hazard_pointer>) +# if __has_include(<linalg>) +# error "please update the header information for <linalg> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<linalg>) +# if __has_include(<rcu>) +# error "please update the header information for <rcu> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<rcu>) +# if __has_include(<spanstream>) +# error "please update the header information for <spanstream> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<spanstream>) +# if __has_include(<stacktrace>) +# error "please update the header information for <stacktrace> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<stacktrace>) +# if __has_include(<stdfloat>) +# error "please update the header information for <stdfloat> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<stdfloat>) +# if __has_include(<text_encoding>) +# error "please update the header information for <text_encoding> in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include(<text_encoding>) +#endif // _WIN32 export module std; |