diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp @@ -43,6 +43,10 @@ # error "__cpp_lib_make_reverse_iterator should not be defined before c++14" # endif +# ifdef __cpp_lib_move_iterator_concept +# error "__cpp_lib_move_iterator_concept should not be defined before c++2b" +# endif + # ifdef __cpp_lib_nonmember_container_access # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif @@ -59,10 +63,6 @@ # error "__cpp_lib_ssize should not be defined before c++20" # endif -# ifdef __cpp_lib_move_iterator_concept -# error "__cpp_lib_move_iterator_concept should not be defined before c++2b" -# endif - #elif TEST_STD_VER == 14 # ifdef __cpp_lib_array_constexpr @@ -80,6 +80,10 @@ # error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++14" # endif +# ifdef __cpp_lib_move_iterator_concept +# error "__cpp_lib_move_iterator_concept should not be defined before c++2b" +# endif + # ifdef __cpp_lib_nonmember_container_access # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif @@ -99,10 +103,6 @@ # error "__cpp_lib_ssize should not be defined before c++20" # endif -# ifdef __cpp_lib_move_iterator_concept -# error "__cpp_lib_move_iterator_concept should not be defined before c++2b" -# endif - #elif TEST_STD_VER == 17 # ifndef __cpp_lib_array_constexpr @@ -123,6 +123,10 @@ # error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++17" # endif +# ifdef __cpp_lib_move_iterator_concept +# error "__cpp_lib_move_iterator_concept should not be defined before c++2b" +# endif + # ifndef __cpp_lib_nonmember_container_access # error "__cpp_lib_nonmember_container_access should be defined in c++17" # endif @@ -168,6 +172,10 @@ # error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++20" # endif +# ifdef __cpp_lib_move_iterator_concept +# error "__cpp_lib_move_iterator_concept should not be defined before c++2b" +# endif + # ifndef __cpp_lib_nonmember_container_access # error "__cpp_lib_nonmember_container_access should be defined in c++20" # endif @@ -196,10 +204,6 @@ # error "__cpp_lib_ssize should have the value 201902L in c++20" # endif -# ifdef __cpp_lib_move_iterator_concept -# error "__cpp_lib_move_iterator_concept should not be defined before c++2b" -# endif - #elif TEST_STD_VER > 20 # ifndef __cpp_lib_array_constexpr @@ -223,6 +227,13 @@ # error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++2b" # endif +# ifndef __cpp_lib_move_iterator_concept +# error "__cpp_lib_move_iterator_concept should be defined in c++2b" +# endif +# if __cpp_lib_move_iterator_concept != 202207L +# error "__cpp_lib_move_iterator_concept should have the value 202207L in c++2b" +# endif + # ifndef __cpp_lib_nonmember_container_access # error "__cpp_lib_nonmember_container_access should be defined in c++2b" # endif @@ -250,12 +261,6 @@ # if __cpp_lib_ssize != 201902L # error "__cpp_lib_ssize should have the value 201902L in c++2b" # endif -# ifndef __cpp_lib_move_iterator_concept -# error "__cpp_lib_move_iterator_concept should be defined in c++2b" -# endif -# if __cpp_lib_move_iterator_concept != 202207L -# error "__cpp_lib_move_iterator_concept should have the value 202207L in c++2b" -# endif #endif // TEST_STD_VER > 20 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 @@ -494,6 +494,10 @@ "values": { "c++2b": 202110 }, "headers": ["functional"], "unimplemented": True, + }, { + "name": "__cpp_lib_move_iterator_concept", + "values": {"c++2b": 202207 }, + "headers": ["iterator"], }, { "name": "__cpp_lib_node_extract", "values": { "c++17": 201606 }, @@ -763,10 +767,6 @@ "name": "__cpp_lib_void_t", "values": { "c++17": 201411 }, "headers": ["type_traits"], - }, { - "name": "__cpp_lib_move_iterator_concept", - "values": {"c++2b": 202207 }, - "headers": ["iterator"], }, ]]