diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst --- a/libcxx/docs/FeatureTestMacroTable.rst +++ b/libcxx/docs/FeatureTestMacroTable.rst @@ -192,7 +192,7 @@ --------------------------------------------------- ----------------- ``__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 --- a/libcxx/include/version +++ b/libcxx/include/version @@ -332,7 +332,7 @@ # 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 --- 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 --- 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 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -226,7 +226,6 @@ "name": "__cpp_lib_bitops", "values": {"c++20": 201907}, "headers": ["bit"], - "unimplemented": True, }, { "name": "__cpp_lib_bitset",