Skip to content

Commit

Permalink
[libc++] Marks __cpp_lib_bitops as implemented.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mordante committed Jun 19, 2023
1 parent e8b3ba2 commit a4f0764
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 69 deletions.
2 changes: 1 addition & 1 deletion libcxx/docs/FeatureTestMacroTable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Status
--------------------------------------------------- -----------------
``__cpp_lib_bit_cast`` ``201806L``
--------------------------------------------------- -----------------
``__cpp_lib_bitops`` *unimplemented*
``__cpp_lib_bitops`` ``201907L``
--------------------------------------------------- -----------------
``__cpp_lib_bounded_array_traits`` ``201902L``
--------------------------------------------------- -----------------
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion libcxx/utils/generate_feature_test_macro_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a4f0764

Please sign in to comment.