From: Arthur O'Dwyer Date: Fri, 8 Jan 2021 22:28:19 +0000 (-0500) Subject: Re-enable __cpp_lib_constexpr_functional. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ca1694b9d07cf14dd15d804b37fa151f4e082c2f;p=android-x86%2Fexternal-llvm-project.git Re-enable __cpp_lib_constexpr_functional. I accidentally disabled this feature-test macro in my D93830, due to a rebasing conflict. It had been enabled by my D93815, and should have remained enabled. --- diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst index 97edbb0a2e1..99fb4e790c7 100644 --- a/libcxx/docs/FeatureTestMacroTable.rst +++ b/libcxx/docs/FeatureTestMacroTable.rst @@ -206,7 +206,7 @@ Status ------------------------------------------------- ----------------- ``__cpp_lib_constexpr_dynamic_alloc`` ``201907L`` ------------------------------------------------- ----------------- - ``__cpp_lib_constexpr_functional`` *unimplemented* + ``__cpp_lib_constexpr_functional`` ``201907L`` ------------------------------------------------- ----------------- ``__cpp_lib_constexpr_iterator`` *unimplemented* ------------------------------------------------- ----------------- diff --git a/libcxx/include/version b/libcxx/include/version index 9ef782a834d..3920b69a601 100644 --- a/libcxx/include/version +++ b/libcxx/include/version @@ -296,7 +296,7 @@ __cpp_lib_void_t 201411L // # define __cpp_lib_constexpr_algorithms 201806L // # define __cpp_lib_constexpr_complex 201711L # define __cpp_lib_constexpr_dynamic_alloc 201907L -// # define __cpp_lib_constexpr_functional 201907L +# define __cpp_lib_constexpr_functional 201907L // # define __cpp_lib_constexpr_iterator 201811L // # define __cpp_lib_constexpr_memory 201811L # define __cpp_lib_constexpr_numeric 201911L diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp index db736a785af..6fa1ac6ada5 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp @@ -198,17 +198,11 @@ # endif # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_constexpr_functional -# error "__cpp_lib_constexpr_functional should be defined in c++20" -# endif -# if __cpp_lib_constexpr_functional != 201907L -# error "__cpp_lib_constexpr_functional should have the value 201907L in c++20" -# endif -# else // _LIBCPP_VERSION -# ifdef __cpp_lib_constexpr_functional -# error "__cpp_lib_constexpr_functional should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_constexpr_functional +# error "__cpp_lib_constexpr_functional should be defined in c++20" +# endif +# if __cpp_lib_constexpr_functional != 201907L +# error "__cpp_lib_constexpr_functional should have the value 201907L in c++20" # endif # ifndef __cpp_lib_invoke @@ -287,17 +281,11 @@ # endif # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_constexpr_functional -# error "__cpp_lib_constexpr_functional should be defined in c++2b" -# endif -# if __cpp_lib_constexpr_functional != 201907L -# error "__cpp_lib_constexpr_functional should have the value 201907L in c++2b" -# endif -# else // _LIBCPP_VERSION -# ifdef __cpp_lib_constexpr_functional -# error "__cpp_lib_constexpr_functional should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_constexpr_functional +# error "__cpp_lib_constexpr_functional should be defined in c++2b" +# endif +# if __cpp_lib_constexpr_functional != 201907L +# error "__cpp_lib_constexpr_functional should have the value 201907L in c++2b" # endif # ifndef __cpp_lib_invoke 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 index 18b367e868d..a75d6db28b2 100644 --- 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 @@ -2407,17 +2407,11 @@ # error "__cpp_lib_constexpr_dynamic_alloc should have the value 201907L in c++20" # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_constexpr_functional -# error "__cpp_lib_constexpr_functional should be defined in c++20" -# endif -# if __cpp_lib_constexpr_functional != 201907L -# error "__cpp_lib_constexpr_functional should have the value 201907L in c++20" -# endif -# else // _LIBCPP_VERSION -# ifdef __cpp_lib_constexpr_functional -# error "__cpp_lib_constexpr_functional should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_constexpr_functional +# error "__cpp_lib_constexpr_functional should be defined in c++20" +# endif +# if __cpp_lib_constexpr_functional != 201907L +# error "__cpp_lib_constexpr_functional should have the value 201907L in c++20" # endif # if !defined(_LIBCPP_VERSION) @@ -3625,17 +3619,11 @@ # error "__cpp_lib_constexpr_dynamic_alloc should have the value 201907L in c++2b" # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_constexpr_functional -# error "__cpp_lib_constexpr_functional should be defined in c++2b" -# endif -# if __cpp_lib_constexpr_functional != 201907L -# error "__cpp_lib_constexpr_functional should have the value 201907L in c++2b" -# endif -# else // _LIBCPP_VERSION -# ifdef __cpp_lib_constexpr_functional -# error "__cpp_lib_constexpr_functional should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_constexpr_functional +# error "__cpp_lib_constexpr_functional should be defined in c++2b" +# endif +# if __cpp_lib_constexpr_functional != 201907L +# error "__cpp_lib_constexpr_functional should have the value 201907L in c++2b" # endif # if !defined(_LIBCPP_VERSION) diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py index 922a132511d..a58c4166306 100755 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -196,7 +196,6 @@ feature_test_macros = [ add_version_header(x) for x in [ "name": "__cpp_lib_constexpr_functional", "values": { "c++20": 201907 }, "headers": ["functional"], - "unimplemented": True, }, { "name": "__cpp_lib_constexpr_iterator", "values": { "c++20": 201811 },