[libcxx-commits] [libcxx] a4f0764 - [libc++] Marks __cpp_lib_bitops as implemented.
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 19 08:01:31 PDT 2023
Author: Mark de Wever
Date: 2023-06-19T17:01:27+02:00
New Revision: a4f0764aefd6ea41e83a5974f582a1a7e985667d
URL: https://github.com/llvm/llvm-project/commit/a4f0764aefd6ea41e83a5974f582a1a7e985667d
DIFF: https://github.com/llvm/llvm-project/commit/a4f0764aefd6ea41e83a5974f582a1a7e985667d.diff
LOG: [libc++] Marks __cpp_lib_bitops as implemented.
This FTM was introduced in
P0553R4 Bit operations
Which has been implemented since libc++ 9.
This was noticed while working on D153192.
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D153225
Added:
Modified:
libcxx/docs/FeatureTestMacroTable.rst
libcxx/include/version
libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.compile.pass.cpp
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
libcxx/utils/generate_feature_test_macro_components.py
Removed:
################################################################################
diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst
index 45e580f397756..4c8e1ffc828bb 100644
--- a/libcxx/docs/FeatureTestMacroTable.rst
+++ b/libcxx/docs/FeatureTestMacroTable.rst
@@ -192,7 +192,7 @@ Status
--------------------------------------------------- -----------------
``__cpp_lib_bit_cast`` ``201806L``
--------------------------------------------------- -----------------
- ``__cpp_lib_bitops`` *unimplemented*
+ ``__cpp_lib_bitops`` ``201907L``
--------------------------------------------------- -----------------
``__cpp_lib_bounded_array_traits`` ``201902L``
--------------------------------------------------- -----------------
diff --git a/libcxx/include/version b/libcxx/include/version
index 5f69eff42b0a1..10abf695dadac 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -332,7 +332,7 @@ __cpp_lib_within_lifetime 202306L <type_traits>
# endif
# define __cpp_lib_bind_front 201907L
# define __cpp_lib_bit_cast 201806L
-// # define __cpp_lib_bitops 201907L
+# define __cpp_lib_bitops 201907L
# define __cpp_lib_bounded_array_traits 201902L
# if !defined(_LIBCPP_HAS_NO_CHAR8_T)
# define __cpp_lib_char8_t 201907L
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.compile.pass.cpp
index b858ff65545d5..0e1d06b928019 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.compile.pass.cpp
@@ -101,17 +101,11 @@
# error "__cpp_lib_bit_cast should have the value 201806L in c++20"
# endif
-# if !defined(_LIBCPP_VERSION)
-# ifndef __cpp_lib_bitops
-# error "__cpp_lib_bitops should be defined in c++20"
-# endif
-# if __cpp_lib_bitops != 201907L
-# error "__cpp_lib_bitops should have the value 201907L in c++20"
-# endif
-# else // _LIBCPP_VERSION
-# ifdef __cpp_lib_bitops
-# error "__cpp_lib_bitops should not be defined because it is unimplemented in libc++!"
-# endif
+# ifndef __cpp_lib_bitops
+# error "__cpp_lib_bitops should be defined in c++20"
+# endif
+# if __cpp_lib_bitops != 201907L
+# error "__cpp_lib_bitops should have the value 201907L in c++20"
# endif
# ifdef __cpp_lib_byteswap
@@ -141,17 +135,11 @@
# error "__cpp_lib_bit_cast should have the value 201806L in c++23"
# endif
-# if !defined(_LIBCPP_VERSION)
-# ifndef __cpp_lib_bitops
-# error "__cpp_lib_bitops should be defined in c++23"
-# endif
-# if __cpp_lib_bitops != 201907L
-# error "__cpp_lib_bitops should have the value 201907L in c++23"
-# endif
-# else // _LIBCPP_VERSION
-# ifdef __cpp_lib_bitops
-# error "__cpp_lib_bitops should not be defined because it is unimplemented in libc++!"
-# endif
+# ifndef __cpp_lib_bitops
+# error "__cpp_lib_bitops should be defined in c++23"
+# endif
+# if __cpp_lib_bitops != 201907L
+# error "__cpp_lib_bitops should have the value 201907L in c++23"
# endif
# ifndef __cpp_lib_byteswap
@@ -184,17 +172,11 @@
# error "__cpp_lib_bit_cast should have the value 201806L in c++26"
# endif
-# if !defined(_LIBCPP_VERSION)
-# ifndef __cpp_lib_bitops
-# error "__cpp_lib_bitops should be defined in c++26"
-# endif
-# if __cpp_lib_bitops != 201907L
-# error "__cpp_lib_bitops should have the value 201907L in c++26"
-# endif
-# else // _LIBCPP_VERSION
-# ifdef __cpp_lib_bitops
-# error "__cpp_lib_bitops should not be defined because it is unimplemented in libc++!"
-# endif
+# ifndef __cpp_lib_bitops
+# error "__cpp_lib_bitops should be defined in c++26"
+# endif
+# if __cpp_lib_bitops != 201907L
+# error "__cpp_lib_bitops should have the value 201907L in c++26"
# endif
# ifndef __cpp_lib_byteswap
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
index dbad0e6b3cf0c..fb7081f2ebbf7 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
@@ -2846,17 +2846,11 @@
# error "__cpp_lib_bit_cast should have the value 201806L in c++20"
# endif
-# if !defined(_LIBCPP_VERSION)
-# ifndef __cpp_lib_bitops
-# error "__cpp_lib_bitops should be defined in c++20"
-# endif
-# if __cpp_lib_bitops != 201907L
-# error "__cpp_lib_bitops should have the value 201907L in c++20"
-# endif
-# else // _LIBCPP_VERSION
-# ifdef __cpp_lib_bitops
-# error "__cpp_lib_bitops should not be defined because it is unimplemented in libc++!"
-# endif
+# ifndef __cpp_lib_bitops
+# error "__cpp_lib_bitops should be defined in c++20"
+# endif
+# if __cpp_lib_bitops != 201907L
+# error "__cpp_lib_bitops should have the value 201907L in c++20"
# endif
# ifdef __cpp_lib_bitset
@@ -4127,17 +4121,11 @@
# error "__cpp_lib_bit_cast should have the value 201806L in c++23"
# endif
-# if !defined(_LIBCPP_VERSION)
-# ifndef __cpp_lib_bitops
-# error "__cpp_lib_bitops should be defined in c++23"
-# endif
-# if __cpp_lib_bitops != 201907L
-# error "__cpp_lib_bitops should have the value 201907L in c++23"
-# endif
-# else // _LIBCPP_VERSION
-# ifdef __cpp_lib_bitops
-# error "__cpp_lib_bitops should not be defined because it is unimplemented in libc++!"
-# endif
+# ifndef __cpp_lib_bitops
+# error "__cpp_lib_bitops should be defined in c++23"
+# endif
+# if __cpp_lib_bitops != 201907L
+# error "__cpp_lib_bitops should have the value 201907L in c++23"
# endif
# ifdef __cpp_lib_bitset
@@ -5615,17 +5603,11 @@
# error "__cpp_lib_bit_cast should have the value 201806L in c++26"
# endif
-# if !defined(_LIBCPP_VERSION)
-# ifndef __cpp_lib_bitops
-# error "__cpp_lib_bitops should be defined in c++26"
-# endif
-# if __cpp_lib_bitops != 201907L
-# error "__cpp_lib_bitops should have the value 201907L in c++26"
-# endif
-# else // _LIBCPP_VERSION
-# ifdef __cpp_lib_bitops
-# error "__cpp_lib_bitops should not be defined because it is unimplemented in libc++!"
-# endif
+# ifndef __cpp_lib_bitops
+# error "__cpp_lib_bitops should be defined in c++26"
+# endif
+# if __cpp_lib_bitops != 201907L
+# error "__cpp_lib_bitops should have the value 201907L in c++26"
# 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 72ae5bdd653a8..4d454f7e42986 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -226,7 +226,6 @@ def add_version_header(tc):
"name": "__cpp_lib_bitops",
"values": {"c++20": 201907},
"headers": ["bit"],
- "unimplemented": True,
},
{
"name": "__cpp_lib_bitset",
More information about the libcxx-commits
mailing list