aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>2021-01-08 17:28:19 -0500
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>2021-01-08 17:30:04 -0500
commitca1694b9d07cf14dd15d804b37fa151f4e082c2f (patch)
tree55aa713047e582899b66afc6a577e818d9f5d8fb
parentbc556e5685c0f97e79fb7b3c6f15cc5062db8e36 (diff)
downloadllvm-ca1694b9d07cf14dd15d804b37fa151f4e082c2f.zip
llvm-ca1694b9d07cf14dd15d804b37fa151f4e082c2f.tar.gz
llvm-ca1694b9d07cf14dd15d804b37fa151f4e082c2f.tar.bz2
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.
-rw-r--r--libcxx/docs/FeatureTestMacroTable.rst2
-rw-r--r--libcxx/include/version2
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp32
-rwxr-xr-xlibcxx/utils/generate_feature_test_macro_components.py1
5 files changed, 22 insertions, 47 deletions
diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst
index 97edbb0..99fb4e7 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 9ef782a..3920b69 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -296,7 +296,7 @@ __cpp_lib_void_t 201411L <type_traits>
// # 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 db736a7..6fa1ac6 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 18b367e..a75d6db 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 922a132..a58c416 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 },