diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst --- a/libcxx/docs/FeatureTestMacroTable.rst +++ b/libcxx/docs/FeatureTestMacroTable.rst @@ -100,7 +100,7 @@ ------------------------------------------------- ----------------- ``__cpp_lib_gcd_lcm`` ``201606L`` ------------------------------------------------- ----------------- - ``__cpp_lib_hardware_interference_size`` ``201703L`` + ``__cpp_lib_hardware_interference_size`` *unimplemented* ------------------------------------------------- ----------------- ``__cpp_lib_has_unique_object_representations`` ``201606L`` ------------------------------------------------- ----------------- diff --git a/libcxx/include/version b/libcxx/include/version --- a/libcxx/include/version +++ b/libcxx/include/version @@ -169,7 +169,7 @@ // # define __cpp_lib_execution 201603L # define __cpp_lib_filesystem 201703L # define __cpp_lib_gcd_lcm 201606L -# define __cpp_lib_hardware_interference_size 201703L +// # define __cpp_lib_hardware_interference_size 201703L # if defined(_LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS) # define __cpp_lib_has_unique_object_representations 201606L # endif diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp @@ -56,11 +56,17 @@ # error "__cpp_lib_destroying_delete should not be defined before c++2a" # endif -# ifndef __cpp_lib_hardware_interference_size -# error "__cpp_lib_hardware_interference_size should be defined in c++17" -# endif -# if __cpp_lib_hardware_interference_size != 201703L -# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++17" +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_hardware_interference_size +# error "__cpp_lib_hardware_interference_size should be defined in c++17" +# endif +# if __cpp_lib_hardware_interference_size != 201703L +# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++17" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_hardware_interference_size +# error "__cpp_lib_hardware_interference_size should not be defined because it is unimplemented in libc++!" +# endif # endif # ifndef __cpp_lib_launder @@ -85,11 +91,17 @@ # endif # endif -# ifndef __cpp_lib_hardware_interference_size -# error "__cpp_lib_hardware_interference_size should be defined in c++2a" -# endif -# if __cpp_lib_hardware_interference_size != 201703L -# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++2a" +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_hardware_interference_size +# error "__cpp_lib_hardware_interference_size should be defined in c++2a" +# endif +# if __cpp_lib_hardware_interference_size != 201703L +# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++2a" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_hardware_interference_size +# error "__cpp_lib_hardware_interference_size should not be defined because it is unimplemented in libc++!" +# endif # endif # ifndef __cpp_lib_launder 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 --- 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 @@ -1074,11 +1074,17 @@ # error "__cpp_lib_generic_unordered_lookup should not be defined before c++2a" # endif -# ifndef __cpp_lib_hardware_interference_size -# error "__cpp_lib_hardware_interference_size should be defined in c++17" -# endif -# if __cpp_lib_hardware_interference_size != 201703L -# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++17" +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_hardware_interference_size +# error "__cpp_lib_hardware_interference_size should be defined in c++17" +# endif +# if __cpp_lib_hardware_interference_size != 201703L +# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++17" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_hardware_interference_size +# error "__cpp_lib_hardware_interference_size should not be defined because it is unimplemented in libc++!" +# endif # endif # if TEST_HAS_BUILTIN_IDENTIFIER(__has_unique_object_representations) || TEST_GCC_VER >= 700 @@ -1789,11 +1795,17 @@ # endif # endif -# ifndef __cpp_lib_hardware_interference_size -# error "__cpp_lib_hardware_interference_size should be defined in c++2a" -# endif -# if __cpp_lib_hardware_interference_size != 201703L -# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++2a" +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_hardware_interference_size +# error "__cpp_lib_hardware_interference_size should be defined in c++2a" +# endif +# if __cpp_lib_hardware_interference_size != 201703L +# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++2a" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_hardware_interference_size +# error "__cpp_lib_hardware_interference_size should not be defined because it is unimplemented in libc++!" +# endif # endif # if TEST_HAS_BUILTIN_IDENTIFIER(__has_unique_object_representations) || TEST_GCC_VER >= 700 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 @@ -200,6 +200,7 @@ "c++17": int(201703), }, "headers": ["new"], + "unimplemented": True, }, {"name": "__cpp_lib_launder", "values": {