diff --git a/libcxx/include/ccomplex b/libcxx/include/ccomplex --- a/libcxx/include/ccomplex +++ b/libcxx/include/ccomplex @@ -19,6 +19,10 @@ #include +#if _LIBCPP_STD_VER > 17 +#error "C++20 removed the header. Please, include or instead" +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif diff --git a/libcxx/include/ciso646 b/libcxx/include/ciso646 --- a/libcxx/include/ciso646 +++ b/libcxx/include/ciso646 @@ -17,6 +17,10 @@ #include <__config> +#if _LIBCPP_STD_VER > 14 +#error "C++17 removed the header. If you are trying to detect the standard library, use instead" +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif diff --git a/libcxx/include/cstdbool b/libcxx/include/cstdbool --- a/libcxx/include/cstdbool +++ b/libcxx/include/cstdbool @@ -21,6 +21,10 @@ #include <__config> +#if _LIBCPP_STD_VER > 17 +#error "C++20 removed the header. bool, true and false are provided as compiler builtins" +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif diff --git a/libcxx/include/ctgmath b/libcxx/include/ctgmath --- a/libcxx/include/ctgmath +++ b/libcxx/include/ctgmath @@ -21,6 +21,10 @@ #include #include +#if _LIBCPP_STD_VER > 17 +#error "C++20 removed the header. Please, use instead" +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif