diff --git a/libcxx/include/version b/libcxx/include/version --- a/libcxx/include/version +++ b/libcxx/include/version @@ -336,7 +336,7 @@ # define __cpp_lib_latch 201907L # endif # define __cpp_lib_list_remove_return_type 201806L -# ifndef _LIBCPP_HAS_NO_CONCEPTS +# if !defined(_LIBCPP_HAS_NO_CONCEPTS) # define __cpp_lib_math_constants 201907L # endif // # define __cpp_lib_polymorphic_allocator 201902L diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/numbers.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/numbers.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/numbers.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/numbers.version.pass.cpp @@ -42,7 +42,7 @@ #elif TEST_STD_VER == 20 -# ifndef _LIBCPP_HAS_NO_CONCEPTS +# if !defined(_LIBCPP_HAS_NO_CONCEPTS) # ifndef __cpp_lib_math_constants # error "__cpp_lib_math_constants should be defined in c++20" # endif @@ -51,13 +51,13 @@ # endif # else # ifdef __cpp_lib_math_constants -# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!" +# error "__cpp_lib_math_constants should not be defined when !defined(_LIBCPP_HAS_NO_CONCEPTS) is not defined!" # endif -# endif // _LIBCPP_HAS_NO_CONCEPTS +# endif #elif TEST_STD_VER > 20 -# ifndef _LIBCPP_HAS_NO_CONCEPTS +# if !defined(_LIBCPP_HAS_NO_CONCEPTS) # ifndef __cpp_lib_math_constants # error "__cpp_lib_math_constants should be defined in c++2b" # endif @@ -66,9 +66,9 @@ # endif # else # ifdef __cpp_lib_math_constants -# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!" +# error "__cpp_lib_math_constants should not be defined when !defined(_LIBCPP_HAS_NO_CONCEPTS) is not defined!" # endif -# endif // _LIBCPP_HAS_NO_CONCEPTS +# endif #endif // TEST_STD_VER > 20 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp @@ -2877,7 +2877,7 @@ # error "__cpp_lib_map_try_emplace should have the value 201411L in c++20" # endif -# ifndef _LIBCPP_HAS_NO_CONCEPTS +# if !defined(_LIBCPP_HAS_NO_CONCEPTS) # ifndef __cpp_lib_math_constants # error "__cpp_lib_math_constants should be defined in c++20" # endif @@ -2886,9 +2886,9 @@ # endif # else # ifdef __cpp_lib_math_constants -# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!" +# error "__cpp_lib_math_constants should not be defined when !defined(_LIBCPP_HAS_NO_CONCEPTS) is not defined!" # endif -# endif // _LIBCPP_HAS_NO_CONCEPTS +# endif # if !defined(_LIBCPP_VERSION) # ifndef __cpp_lib_math_special_functions @@ -4087,7 +4087,7 @@ # error "__cpp_lib_map_try_emplace should have the value 201411L in c++2b" # endif -# if !_LIBCPP_HAS_NO_CONCEPTS +# if !defined(_LIBCPP_HAS_NO_CONCEPTS) # ifndef __cpp_lib_math_constants # error "__cpp_lib_math_constants should be defined in c++2b" # endif @@ -4096,9 +4096,9 @@ # endif # else # ifdef __cpp_lib_math_constants -# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!" +# error "__cpp_lib_math_constants should not be defined when !defined(_LIBCPP_HAS_NO_CONCEPTS) is not defined!" # endif -# endif // !_LIBCPP_HAS_NO_CONCEPTS +# endif # if !defined(_LIBCPP_VERSION) # ifndef __cpp_lib_math_special_functions diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -421,8 +421,8 @@ "name": "__cpp_lib_math_constants", "values": { "c++20": 201907 }, "headers": ["numbers"], - "depends": "defined(__cpp_concepts) && __cpp_concepts >= 201907L", - "internal_depends": "defined(__cpp_concepts) && __cpp_concepts >= 201907L", + "depends": "!defined(_LIBCPP_HAS_NO_CONCEPTS)", + "internal_depends": "!defined(_LIBCPP_HAS_NO_CONCEPTS)", }, { "name": "__cpp_lib_math_special_functions", "values": { "c++17": 201603 },