[libc++] Marks __cpp_lib_bitops as implemented.
authorMark de Wever <koraq@xs4all.nl>
Sun, 18 Jun 2023 10:35:44 +0000 (12:35 +0200)
committerMark de Wever <koraq@xs4all.nl>
Mon, 19 Jun 2023 15:01:27 +0000 (17:01 +0200)
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

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

index 45e580f..4c8e1ff 100644 (file)
@@ -192,7 +192,7 @@ Status
     --------------------------------------------------- -----------------
     ``__cpp_lib_bit_cast``                              ``201806L``
     --------------------------------------------------- -----------------
-    ``__cpp_lib_bitops``                                *unimplemented*
+    ``__cpp_lib_bitops``                                ``201907L``
     --------------------------------------------------- -----------------
     ``__cpp_lib_bounded_array_traits``                  ``201902L``
     --------------------------------------------------- -----------------
index 5f69eff..10abf69 100644 (file)
@@ -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
index b858ff6..0e1d06b 100644 (file)
 #   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
 #   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
 #   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
index dbad0e6..fb7081f 100644 (file)
 #   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
 #   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
 #   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)
index 72ae5bd..4d454f7 100755 (executable)
@@ -226,7 +226,6 @@ feature_test_macros = [
             "name": "__cpp_lib_bitops",
             "values": {"c++20": 201907},
             "headers": ["bit"],
-            "unimplemented": True,
         },
         {
             "name": "__cpp_lib_bitset",