diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst --- a/libcxx/docs/FeatureTestMacroTable.rst +++ b/libcxx/docs/FeatureTestMacroTable.rst @@ -302,8 +302,12 @@ ------------------------------------------------- ----------------- ``__cpp_lib_associative_heterogeneous_erasure`` *unimplemented* ------------------------------------------------- ----------------- + ``__cpp_lib_bind_back`` *unimplemented* + ------------------------------------------------- ----------------- ``__cpp_lib_byteswap`` ``202110L`` ------------------------------------------------- ----------------- + ``__cpp_lib_constexpr_cmath`` *unimplemented* + ------------------------------------------------- ----------------- ``__cpp_lib_constexpr_typeinfo`` *unimplemented* ------------------------------------------------- ----------------- ``__cpp_lib_invoke_r`` *unimplemented* @@ -316,10 +320,24 @@ ------------------------------------------------- ----------------- ``__cpp_lib_out_ptr`` *unimplemented* ------------------------------------------------- ----------------- + ``__cpp_lib_ranges_chunk`` *unimplemented* + ------------------------------------------------- ----------------- + ``__cpp_lib_ranges_chunk_by`` *unimplemented* + ------------------------------------------------- ----------------- + ``__cpp_lib_ranges_iota`` *unimplemented* + ------------------------------------------------- ----------------- + ``__cpp_lib_ranges_join_with`` *unimplemented* + ------------------------------------------------- ----------------- + ``__cpp_lib_ranges_slide`` *unimplemented* + ------------------------------------------------- ----------------- ``__cpp_lib_ranges_starts_ends_with`` *unimplemented* ------------------------------------------------- ----------------- + ``__cpp_lib_ranges_to_container`` *unimplemented* + ------------------------------------------------- ----------------- ``__cpp_lib_ranges_zip`` *unimplemented* ------------------------------------------------- ----------------- + ``__cpp_lib_reference_from_temporary`` *unimplemented* + ------------------------------------------------- ----------------- ``__cpp_lib_spanstream`` *unimplemented* ------------------------------------------------- ----------------- ``__cpp_lib_stacktrace`` *unimplemented* @@ -331,5 +349,7 @@ ``__cpp_lib_string_resize_and_overwrite`` ``202110L`` ------------------------------------------------- ----------------- ``__cpp_lib_to_underlying`` ``202102L`` + ------------------------------------------------- ----------------- + ``__cpp_lib_unreachable`` *unimplemented* ================================================= ================= diff --git a/libcxx/docs/Status/Cxx2bPapers.csv b/libcxx/docs/Status/Cxx2bPapers.csv --- a/libcxx/docs/Status/Cxx2bPapers.csv +++ b/libcxx/docs/Status/Cxx2bPapers.csv @@ -11,7 +11,7 @@ "`P2212R2 `__","LWG","Relax Requirements for time_point::clock","February 2021","","" "`P2259R1 `__","LWG","Repairing input range adaptors and counted_iterator","February 2021","","" "","","","","","" -"`P0401R6 `__","LWG","Providing size feedback in the Allocator interface","June 2021","", +"`P0401R6 `__","LWG","Providing size feedback in the Allocator interface","June 2021","","" "`P0448R4 `__","LWG","A strstream replacement using span as buffer","June 2021","","" "`P1132R8 `__","LWG","out_ptr - a scalable output pointer abstraction","June 2021","","" "`P1328R1 `__","LWG","Making std::type_info::operator== constexpr","June 2021","","" @@ -38,3 +38,16 @@ "`P2393R1 `__","LWG","Cleaning up ``integer``-class types","October 2021","","" "`P2401R0 `__","LWG","Add a conditional ``noexcept`` specification to ``std::exchange``","October 2021","|Complete|","14.0" "","","","","","" +"`P0323R12 `__","LWG","``std::expected``","February 2022","","" +"`P0533R9 `__","LWG","``constexpr`` for ```` and ````","February 2022","","" +"`P0627R6 `__","LWG","Function to mark unreachable code","February 2022","","" +"`P1206R7 `__","LWG","``ranges::to``: A function to convert any range to a container","February 2022","","" +"`P1413R3 `__","LWG","Deprecate ``std::aligned_storage`` and ``std::aligned_union``","February 2022","","" +"`P2255R3 `__","LWG","A type trait to detect reference binding to temporary","February 2022","","" +"`P2273R3 `__","LWG","Making ``std::unique_ptr`` constexpr","February 2022","","" +"`P2387R3 `__","LWG","Pipe support for user-defined range adaptors","February 2022","","" +"`P2440R1 `__","LWG","``ranges::iota``, ``ranges::shift_left`` and ``ranges::shift_right``","February 2022","","" +"`P2441R2 `__","LWG","``views::join_view``","February 2022","","" +"`P2442R1 `__","LWG","Windowing range adaptors: ``views::chunk`` and ``views::slide``","February 2022","","" +"`P2443R1 `__","LWG","``views::chunk_by``","February 2022","","" +"","","","","","" diff --git a/libcxx/include/version b/libcxx/include/version --- a/libcxx/include/version +++ b/libcxx/include/version @@ -38,6 +38,7 @@ __cpp_lib_atomic_value_initialization 201911L __cpp_lib_atomic_wait 201907L __cpp_lib_barrier 201907L +__cpp_lib_bind_back 202202L __cpp_lib_bind_front 201907L __cpp_lib_bit_cast 201806L __cpp_lib_bitops 201907L @@ -55,6 +56,7 @@ __cpp_lib_complex_udls 201309L __cpp_lib_concepts 202002L __cpp_lib_constexpr_algorithms 201806L +__cpp_lib_constexpr_cmath 202202L __cpp_lib_constexpr_complex 201711L __cpp_lib_constexpr_dynamic_alloc 201907L __cpp_lib_constexpr_functional 201907L @@ -132,9 +134,19 @@ __cpp_lib_quoted_string_io 201304L __cpp_lib_ranges 201811L +__cpp_lib_ranges_chunk 202202L +__cpp_lib_ranges_chunk_by 202202L +__cpp_lib_ranges_iota 202202L +__cpp_lib_ranges_join_with 202202L +__cpp_lib_ranges_slide 202202L __cpp_lib_ranges_starts_ends_with 202106L +__cpp_lib_ranges_to_container 202202L + + + __cpp_lib_ranges_zip 202110L __cpp_lib_raw_memory_algorithms 201606L +__cpp_lib_reference_from_temporary 202202L __cpp_lib_remove_cvref 201711L __cpp_lib_result_of_sfinae 201210L __cpp_lib_robust_nonmodifying_seq_ops 201304L @@ -174,6 +186,7 @@ __cpp_lib_type_trait_variable_templates 201510L __cpp_lib_uncaught_exceptions 201411L __cpp_lib_unordered_map_try_emplace 201411L +__cpp_lib_unreachable 202202L __cpp_lib_unwrap_ref 201811L __cpp_lib_variant 202102L __cpp_lib_void_t 201411L @@ -363,21 +376,31 @@ # define __cpp_lib_adaptor_iterator_pair_constructor 202106L // # define __cpp_lib_allocate_at_least 202106L // # define __cpp_lib_associative_heterogeneous_erasure 202110L +// # define __cpp_lib_bind_back 202202L # define __cpp_lib_byteswap 202110L +// # define __cpp_lib_constexpr_cmath 202202L // # define __cpp_lib_constexpr_typeinfo 202106L // # define __cpp_lib_invoke_r 202106L # define __cpp_lib_is_scoped_enum 202011L # define __cpp_lib_monadic_optional 202110L // # define __cpp_lib_move_only_function 202110L // # define __cpp_lib_out_ptr 202106L +// # define __cpp_lib_ranges_chunk 202202L +// # define __cpp_lib_ranges_chunk_by 202202L +// # define __cpp_lib_ranges_iota 202202L +// # define __cpp_lib_ranges_join_with 202202L +// # define __cpp_lib_ranges_slide 202202L // # define __cpp_lib_ranges_starts_ends_with 202106L +// # define __cpp_lib_ranges_to_container 202202L // # define __cpp_lib_ranges_zip 202110L +// # define __cpp_lib_reference_from_temporary 202202L // # define __cpp_lib_spanstream 202106L // # define __cpp_lib_stacktrace 202011L // # define __cpp_lib_stdatomic_h 202011L # define __cpp_lib_string_contains 202011L # define __cpp_lib_string_resize_and_overwrite 202110L # define __cpp_lib_to_underlying 202102L +// # define __cpp_lib_unreachable 202202L #endif // clang-format on diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp @@ -16,6 +16,7 @@ // Test the feature test macros defined by /* Constant Value + __cpp_lib_constexpr_cmath 202202L [C++2b] __cpp_lib_hypot 201603L [C++17] __cpp_lib_interpolate 201902L [C++20] __cpp_lib_math_special_functions 201603L [C++17] @@ -26,6 +27,10 @@ #if TEST_STD_VER < 14 +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + # ifdef __cpp_lib_hypot # error "__cpp_lib_hypot should not be defined before c++17" # endif @@ -40,6 +45,10 @@ #elif TEST_STD_VER == 14 +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + # ifdef __cpp_lib_hypot # error "__cpp_lib_hypot should not be defined before c++17" # endif @@ -54,6 +63,10 @@ #elif TEST_STD_VER == 17 +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + # ifndef __cpp_lib_hypot # error "__cpp_lib_hypot should be defined in c++17" # endif @@ -80,6 +93,10 @@ #elif TEST_STD_VER == 20 +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + # ifndef __cpp_lib_hypot # error "__cpp_lib_hypot should be defined in c++20" # endif @@ -109,6 +126,19 @@ #elif TEST_STD_VER > 20 +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should be defined in c++2b" +# endif +# if __cpp_lib_constexpr_cmath != 202202L +# error "__cpp_lib_constexpr_cmath should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined because it is unimplemented in libc++!" +# endif +# endif + # ifndef __cpp_lib_hypot # error "__cpp_lib_hypot should be defined in c++2b" # endif diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/cstdlib.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/cstdlib.version.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/cstdlib.version.pass.cpp @@ -0,0 +1,66 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// WARNING: This test was generated by generate_feature_test_macro_components.py +// and should not be edited manually. +// +// clang-format off + +// + +// Test the feature test macros defined by + +/* Constant Value + __cpp_lib_constexpr_cmath 202202L [C++2b] +*/ + +#include +#include "test_macros.h" + +#if TEST_STD_VER < 14 + +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + +#elif TEST_STD_VER == 14 + +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + +#elif TEST_STD_VER == 17 + +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + +#elif TEST_STD_VER == 20 + +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + +#elif TEST_STD_VER > 20 + +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should be defined in c++2b" +# endif +# if __cpp_lib_constexpr_cmath != 202202L +# error "__cpp_lib_constexpr_cmath should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined because it is unimplemented in libc++!" +# endif +# endif + +#endif // TEST_STD_VER > 20 + +int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp @@ -19,6 +19,7 @@ __cpp_lib_allocator_traits_is_always_equal 201411L [C++17] __cpp_lib_erase_if 202002L [C++20] __cpp_lib_nonmember_container_access 201411L [C++17] + __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -38,6 +39,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_allocator_traits_is_always_equal @@ -52,6 +57,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -72,6 +81,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -95,6 +108,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -118,6 +135,19 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp @@ -21,6 +21,7 @@ __cpp_lib_incomplete_container_elements 201505L [C++17] __cpp_lib_list_remove_return_type 201806L [C++20] __cpp_lib_nonmember_container_access 201411L [C++17] + __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -48,6 +49,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_allocator_traits_is_always_equal @@ -70,6 +75,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -101,6 +110,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -138,6 +151,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -175,6 +192,19 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp @@ -16,6 +16,7 @@ // Test the feature test macros defined by /* Constant Value + __cpp_lib_bind_back 202202L [C++2b] __cpp_lib_bind_front 201907L [C++20] __cpp_lib_boyer_moore_searcher 201603L [C++17] __cpp_lib_constexpr_functional 201907L [C++20] @@ -35,6 +36,10 @@ #if TEST_STD_VER < 14 +# ifdef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should not be defined before c++2b" +# endif + # ifdef __cpp_lib_bind_front # error "__cpp_lib_bind_front should not be defined before c++20" # endif @@ -81,6 +86,10 @@ #elif TEST_STD_VER == 14 +# ifdef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should not be defined before c++2b" +# endif + # ifdef __cpp_lib_bind_front # error "__cpp_lib_bind_front should not be defined before c++20" # endif @@ -133,6 +142,10 @@ #elif TEST_STD_VER == 17 +# ifdef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should not be defined before c++2b" +# endif + # ifdef __cpp_lib_bind_front # error "__cpp_lib_bind_front should not be defined before c++20" # endif @@ -200,6 +213,10 @@ #elif TEST_STD_VER == 20 +# ifdef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should not be defined before c++2b" +# endif + # ifndef __cpp_lib_bind_front # error "__cpp_lib_bind_front should be defined in c++20" # endif @@ -285,6 +302,19 @@ #elif TEST_STD_VER > 20 +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should be defined in c++2b" +# endif +# if __cpp_lib_bind_back != 202202L +# error "__cpp_lib_bind_back should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should not be defined because it is unimplemented in libc++!" +# endif +# endif + # ifndef __cpp_lib_bind_front # error "__cpp_lib_bind_front should be defined in c++2b" # endif diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp @@ -21,6 +21,7 @@ __cpp_lib_incomplete_container_elements 201505L [C++17] __cpp_lib_list_remove_return_type 201806L [C++20] __cpp_lib_nonmember_container_access 201411L [C++17] + __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -48,6 +49,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_allocator_traits_is_always_equal @@ -70,6 +75,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -101,6 +110,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -138,6 +151,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -175,6 +192,19 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp @@ -23,6 +23,7 @@ __cpp_lib_map_try_emplace 201411L [C++17] __cpp_lib_node_extract 201606L [C++17] __cpp_lib_nonmember_container_access 201411L [C++17] + __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -58,6 +59,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_allocator_traits_is_always_equal @@ -91,6 +96,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -136,6 +145,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -184,6 +197,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -241,6 +258,19 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp @@ -20,6 +20,7 @@ __cpp_lib_gcd_lcm 201606L [C++17] __cpp_lib_interpolate 201902L [C++20] __cpp_lib_parallel_algorithm 201603L [C++17] + __cpp_lib_ranges_iota 202202L [C++2b] */ #include @@ -43,6 +44,10 @@ # error "__cpp_lib_parallel_algorithm should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_constexpr_numeric @@ -61,6 +66,10 @@ # error "__cpp_lib_parallel_algorithm should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifdef __cpp_lib_constexpr_numeric @@ -91,6 +100,10 @@ # endif # endif +# ifdef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifndef __cpp_lib_constexpr_numeric @@ -127,6 +140,10 @@ # endif # endif +# ifdef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_constexpr_numeric @@ -163,6 +180,19 @@ # endif # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should be defined in c++2b" +# endif +# if __cpp_lib_ranges_iota != 202202L +# error "__cpp_lib_ranges_iota should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.pass.cpp @@ -17,6 +17,7 @@ /* Constant Value __cpp_lib_adaptor_iterator_pair_constructor 202106L [C++2b] + __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -28,24 +29,40 @@ # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_adaptor_iterator_pair_constructor # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifdef __cpp_lib_adaptor_iterator_pair_constructor # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifdef __cpp_lib_adaptor_iterator_pair_constructor # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_adaptor_iterator_pair_constructor @@ -55,6 +72,19 @@ # error "__cpp_lib_adaptor_iterator_pair_constructor should have the value 202106L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.pass.cpp @@ -17,9 +17,13 @@ // Test the feature test macros defined by -/* Constant Value - __cpp_lib_ranges 201811L [C++20] - __cpp_lib_ranges_zip 202110L [C++2b] +/* Constant Value + __cpp_lib_ranges 201811L [C++20] + __cpp_lib_ranges_chunk 202202L [C++2b] + __cpp_lib_ranges_chunk_by 202202L [C++2b] + __cpp_lib_ranges_join_with 202202L [C++2b] + __cpp_lib_ranges_slide 202202L [C++2b] + __cpp_lib_ranges_zip 202110L [C++2b] */ #include @@ -31,6 +35,22 @@ # error "__cpp_lib_ranges should not be defined before c++20" # endif +# ifdef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_zip # error "__cpp_lib_ranges_zip should not be defined before c++2b" # endif @@ -41,6 +61,22 @@ # error "__cpp_lib_ranges should not be defined before c++20" # endif +# ifdef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_zip # error "__cpp_lib_ranges_zip should not be defined before c++2b" # endif @@ -51,6 +87,22 @@ # error "__cpp_lib_ranges should not be defined before c++20" # endif +# ifdef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_zip # error "__cpp_lib_ranges_zip should not be defined before c++2b" # endif @@ -70,6 +122,22 @@ # endif # endif +# ifdef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_zip # error "__cpp_lib_ranges_zip should not be defined before c++2b" # endif @@ -89,6 +157,58 @@ # endif # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should be defined in c++2b" +# endif +# if __cpp_lib_ranges_chunk != 202202L +# error "__cpp_lib_ranges_chunk should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should not be defined because it is unimplemented in libc++!" +# endif +# endif + +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should be defined in c++2b" +# endif +# if __cpp_lib_ranges_chunk_by != 202202L +# error "__cpp_lib_ranges_chunk_by should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should not be defined because it is unimplemented in libc++!" +# endif +# endif + +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should be defined in c++2b" +# endif +# if __cpp_lib_ranges_join_with != 202202L +# error "__cpp_lib_ranges_join_with should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should not be defined because it is unimplemented in libc++!" +# endif +# endif + +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should be defined in c++2b" +# endif +# if __cpp_lib_ranges_slide != 202202L +# error "__cpp_lib_ranges_slide should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should not be defined because it is unimplemented in libc++!" +# endif +# endif + # if !defined(_LIBCPP_VERSION) # ifndef __cpp_lib_ranges_zip # error "__cpp_lib_ranges_zip should be defined in c++2b" diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp @@ -22,6 +22,7 @@ __cpp_lib_generic_associative_lookup 201304L [C++14] __cpp_lib_node_extract 201606L [C++17] __cpp_lib_nonmember_container_access 201411L [C++17] + __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -53,6 +54,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_allocator_traits_is_always_equal @@ -82,6 +87,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -120,6 +129,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -161,6 +174,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -211,6 +228,19 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.pass.cpp @@ -17,6 +17,7 @@ /* Constant Value __cpp_lib_adaptor_iterator_pair_constructor 202106L [C++2b] + __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -28,24 +29,40 @@ # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_adaptor_iterator_pair_constructor # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifdef __cpp_lib_adaptor_iterator_pair_constructor # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifdef __cpp_lib_adaptor_iterator_pair_constructor # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_adaptor_iterator_pair_constructor @@ -55,6 +72,19 @@ # error "__cpp_lib_adaptor_iterator_pair_constructor should have the value 202106L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp @@ -21,6 +21,7 @@ __cpp_lib_constexpr_string 201811L [C++20] __cpp_lib_erase_if 202002L [C++20] __cpp_lib_nonmember_container_access 201411L [C++17] + __cpp_lib_ranges_to_container 202202L [C++2b] __cpp_lib_starts_ends_with 201711L [C++20] __cpp_lib_string_contains 202011L [C++2b] __cpp_lib_string_resize_and_overwrite 202110L [C++2b] @@ -54,6 +55,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifdef __cpp_lib_starts_ends_with # error "__cpp_lib_starts_ends_with should not be defined before c++20" # endif @@ -96,6 +101,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifdef __cpp_lib_starts_ends_with # error "__cpp_lib_starts_ends_with should not be defined before c++20" # endif @@ -147,6 +156,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifdef __cpp_lib_starts_ends_with # error "__cpp_lib_starts_ends_with should not be defined before c++20" # endif @@ -216,6 +229,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifndef __cpp_lib_starts_ends_with # error "__cpp_lib_starts_ends_with should be defined in c++20" # endif @@ -288,6 +305,19 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + # ifndef __cpp_lib_starts_ends_with # error "__cpp_lib_starts_ends_with should be defined in c++2b" # endif diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp @@ -31,6 +31,7 @@ __cpp_lib_is_scoped_enum 202011L [C++2b] __cpp_lib_is_swappable 201603L [C++17] __cpp_lib_logical_traits 201510L [C++17] + __cpp_lib_reference_from_temporary 202202L [C++2b] __cpp_lib_remove_cvref 201711L [C++20] __cpp_lib_result_of_sfinae 201210L [C++14] __cpp_lib_transformation_trait_aliases 201304L [C++14] @@ -104,6 +105,10 @@ # error "__cpp_lib_logical_traits should not be defined before c++17" # endif +# ifdef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should not be defined before c++2b" +# endif + # ifdef __cpp_lib_remove_cvref # error "__cpp_lib_remove_cvref should not be defined before c++20" # endif @@ -199,6 +204,10 @@ # error "__cpp_lib_logical_traits should not be defined before c++17" # endif +# ifdef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should not be defined before c++2b" +# endif + # ifdef __cpp_lib_remove_cvref # error "__cpp_lib_remove_cvref should not be defined before c++20" # endif @@ -318,6 +327,10 @@ # error "__cpp_lib_logical_traits should have the value 201510L in c++17" # endif +# ifdef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should not be defined before c++2b" +# endif + # ifdef __cpp_lib_remove_cvref # error "__cpp_lib_remove_cvref should not be defined before c++20" # endif @@ -470,6 +483,10 @@ # error "__cpp_lib_logical_traits should have the value 201510L in c++20" # endif +# ifdef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should not be defined before c++2b" +# endif + # ifndef __cpp_lib_remove_cvref # error "__cpp_lib_remove_cvref should be defined in c++20" # endif @@ -631,6 +648,19 @@ # error "__cpp_lib_logical_traits should have the value 201510L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should be defined in c++2b" +# endif +# if __cpp_lib_reference_from_temporary != 202202L +# error "__cpp_lib_reference_from_temporary should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should not be defined because it is unimplemented in libc++!" +# endif +# endif + # ifndef __cpp_lib_remove_cvref # error "__cpp_lib_remove_cvref should be defined in c++2b" # endif diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp @@ -22,6 +22,7 @@ __cpp_lib_generic_unordered_lookup 201811L [C++20] __cpp_lib_node_extract 201606L [C++17] __cpp_lib_nonmember_container_access 201411L [C++17] + __cpp_lib_ranges_to_container 202202L [C++2b] __cpp_lib_unordered_map_try_emplace 201411L [C++17] */ @@ -54,6 +55,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifdef __cpp_lib_unordered_map_try_emplace # error "__cpp_lib_unordered_map_try_emplace should not be defined before c++17" # endif @@ -84,6 +89,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifdef __cpp_lib_unordered_map_try_emplace # error "__cpp_lib_unordered_map_try_emplace should not be defined before c++17" # endif @@ -123,6 +132,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifndef __cpp_lib_unordered_map_try_emplace # error "__cpp_lib_unordered_map_try_emplace should be defined in c++17" # endif @@ -171,6 +184,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifndef __cpp_lib_unordered_map_try_emplace # error "__cpp_lib_unordered_map_try_emplace should be defined in c++20" # endif @@ -228,6 +245,19 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + # ifndef __cpp_lib_unordered_map_try_emplace # error "__cpp_lib_unordered_map_try_emplace should be defined in c++2b" # endif diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp @@ -22,6 +22,7 @@ __cpp_lib_generic_unordered_lookup 201811L [C++20] __cpp_lib_node_extract 201606L [C++17] __cpp_lib_nonmember_container_access 201411L [C++17] + __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -53,6 +54,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_allocator_traits_is_always_equal @@ -79,6 +84,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -114,6 +123,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -155,6 +168,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -205,6 +222,19 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp @@ -24,6 +24,7 @@ __cpp_lib_ranges_zip 202110L [C++2b] __cpp_lib_to_underlying 202102L [C++2b] __cpp_lib_tuples_by_type 201304L [C++14] + __cpp_lib_unreachable 202202L [C++2b] */ #include @@ -63,6 +64,10 @@ # error "__cpp_lib_tuples_by_type should not be defined before c++14" # endif +# ifdef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_as_const @@ -106,6 +111,10 @@ # error "__cpp_lib_tuples_by_type should have the value 201304L in c++14" # endif +# ifdef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifndef __cpp_lib_as_const @@ -152,6 +161,10 @@ # error "__cpp_lib_tuples_by_type should have the value 201304L in c++17" # endif +# ifdef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifndef __cpp_lib_as_const @@ -210,6 +223,10 @@ # error "__cpp_lib_tuples_by_type should have the value 201304L in c++20" # endif +# ifdef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_as_const @@ -280,6 +297,19 @@ # error "__cpp_lib_tuples_by_type should have the value 201304L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should be defined in c++2b" +# endif +# if __cpp_lib_unreachable != 202202L +# error "__cpp_lib_unreachable should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp @@ -21,6 +21,7 @@ __cpp_lib_erase_if 202002L [C++20] __cpp_lib_incomplete_container_elements 201505L [C++17] __cpp_lib_nonmember_container_access 201411L [C++17] + __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -48,6 +49,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 14 # ifdef __cpp_lib_allocator_traits_is_always_equal @@ -70,6 +75,10 @@ # error "__cpp_lib_nonmember_container_access should not be defined before c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 17 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -101,6 +110,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER == 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -144,6 +157,10 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + #elif TEST_STD_VER > 20 # ifndef __cpp_lib_allocator_traits_is_always_equal @@ -187,6 +204,19 @@ # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + #endif // TEST_STD_VER > 20 int main(int, char**) { return 0; } 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 @@ -36,6 +36,7 @@ __cpp_lib_atomic_value_initialization 201911L [C++20] __cpp_lib_atomic_wait 201907L [C++20] __cpp_lib_barrier 201907L [C++20] + __cpp_lib_bind_back 202202L [C++2b] __cpp_lib_bind_front 201907L [C++20] __cpp_lib_bit_cast 201806L [C++20] __cpp_lib_bitops 201907L [C++20] @@ -51,6 +52,7 @@ __cpp_lib_complex_udls 201309L [C++14] __cpp_lib_concepts 202002L [C++20] __cpp_lib_constexpr_algorithms 201806L [C++20] + __cpp_lib_constexpr_cmath 202202L [C++2b] __cpp_lib_constexpr_complex 201711L [C++20] __cpp_lib_constexpr_dynamic_alloc 201907L [C++20] __cpp_lib_constexpr_functional 201907L [C++20] @@ -121,9 +123,16 @@ __cpp_lib_polymorphic_allocator 201902L [C++20] __cpp_lib_quoted_string_io 201304L [C++14] __cpp_lib_ranges 201811L [C++20] + __cpp_lib_ranges_chunk 202202L [C++2b] + __cpp_lib_ranges_chunk_by 202202L [C++2b] + __cpp_lib_ranges_iota 202202L [C++2b] + __cpp_lib_ranges_join_with 202202L [C++2b] + __cpp_lib_ranges_slide 202202L [C++2b] __cpp_lib_ranges_starts_ends_with 202106L [C++2b] + __cpp_lib_ranges_to_container 202202L [C++2b] __cpp_lib_ranges_zip 202110L [C++2b] __cpp_lib_raw_memory_algorithms 201606L [C++17] + __cpp_lib_reference_from_temporary 202202L [C++2b] __cpp_lib_remove_cvref 201711L [C++20] __cpp_lib_result_of_sfinae 201210L [C++14] __cpp_lib_robust_nonmodifying_seq_ops 201304L [C++14] @@ -163,6 +172,7 @@ __cpp_lib_type_trait_variable_templates 201510L [C++17] __cpp_lib_uncaught_exceptions 201411L [C++17] __cpp_lib_unordered_map_try_emplace 201411L [C++17] + __cpp_lib_unreachable 202202L [C++2b] __cpp_lib_unwrap_ref 201811L [C++20] __cpp_lib_variant 202102L [C++17] __cpp_lib_void_t 201411L [C++17] @@ -249,6 +259,10 @@ # error "__cpp_lib_barrier should not be defined before c++20" # endif +# ifdef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should not be defined before c++2b" +# endif + # ifdef __cpp_lib_bind_front # error "__cpp_lib_bind_front should not be defined before c++20" # endif @@ -309,6 +323,10 @@ # error "__cpp_lib_constexpr_algorithms should not be defined before c++20" # endif +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + # ifdef __cpp_lib_constexpr_complex # error "__cpp_lib_constexpr_complex should not be defined before c++20" # endif @@ -585,10 +603,34 @@ # error "__cpp_lib_ranges should not be defined before c++20" # endif +# ifdef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_starts_ends_with # error "__cpp_lib_ranges_starts_ends_with should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_zip # error "__cpp_lib_ranges_zip should not be defined before c++2b" # endif @@ -597,6 +639,10 @@ # error "__cpp_lib_raw_memory_algorithms should not be defined before c++17" # endif +# ifdef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should not be defined before c++2b" +# endif + # ifdef __cpp_lib_remove_cvref # error "__cpp_lib_remove_cvref should not be defined before c++20" # endif @@ -745,6 +791,10 @@ # error "__cpp_lib_unordered_map_try_emplace should not be defined before c++17" # endif +# ifdef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should not be defined before c++2b" +# endif + # ifdef __cpp_lib_unwrap_ref # error "__cpp_lib_unwrap_ref should not be defined before c++20" # endif @@ -835,6 +885,10 @@ # error "__cpp_lib_barrier should not be defined before c++20" # endif +# ifdef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should not be defined before c++2b" +# endif + # ifdef __cpp_lib_bind_front # error "__cpp_lib_bind_front should not be defined before c++20" # endif @@ -901,6 +955,10 @@ # error "__cpp_lib_constexpr_algorithms should not be defined before c++20" # endif +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + # ifdef __cpp_lib_constexpr_complex # error "__cpp_lib_constexpr_complex should not be defined before c++20" # endif @@ -1207,10 +1265,34 @@ # error "__cpp_lib_ranges should not be defined before c++20" # endif +# ifdef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_starts_ends_with # error "__cpp_lib_ranges_starts_ends_with should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_zip # error "__cpp_lib_ranges_zip should not be defined before c++2b" # endif @@ -1219,6 +1301,10 @@ # error "__cpp_lib_raw_memory_algorithms should not be defined before c++17" # endif +# ifdef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should not be defined before c++2b" +# endif + # ifdef __cpp_lib_remove_cvref # error "__cpp_lib_remove_cvref should not be defined before c++20" # endif @@ -1397,6 +1483,10 @@ # error "__cpp_lib_unordered_map_try_emplace should not be defined before c++17" # endif +# ifdef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should not be defined before c++2b" +# endif + # ifdef __cpp_lib_unwrap_ref # error "__cpp_lib_unwrap_ref should not be defined before c++20" # endif @@ -1508,6 +1598,10 @@ # error "__cpp_lib_barrier should not be defined before c++20" # endif +# ifdef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should not be defined before c++2b" +# endif + # ifdef __cpp_lib_bind_front # error "__cpp_lib_bind_front should not be defined before c++20" # endif @@ -1595,6 +1689,10 @@ # error "__cpp_lib_constexpr_algorithms should not be defined before c++20" # endif +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + # ifdef __cpp_lib_constexpr_complex # error "__cpp_lib_constexpr_complex should not be defined before c++20" # endif @@ -2006,10 +2104,34 @@ # error "__cpp_lib_ranges should not be defined before c++20" # endif +# ifdef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_starts_ends_with # error "__cpp_lib_ranges_starts_ends_with should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_zip # error "__cpp_lib_ranges_zip should not be defined before c++2b" # endif @@ -2021,6 +2143,10 @@ # error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++17" # endif +# ifdef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should not be defined before c++2b" +# endif + # ifdef __cpp_lib_remove_cvref # error "__cpp_lib_remove_cvref should not be defined before c++20" # endif @@ -2241,6 +2367,10 @@ # error "__cpp_lib_unordered_map_try_emplace should have the value 201411L in c++17" # endif +# ifdef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should not be defined before c++2b" +# endif + # ifdef __cpp_lib_unwrap_ref # error "__cpp_lib_unwrap_ref should not be defined before c++20" # endif @@ -2421,6 +2551,10 @@ # endif # endif +# ifdef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should not be defined before c++2b" +# endif + # ifndef __cpp_lib_bind_front # error "__cpp_lib_bind_front should be defined in c++20" # endif @@ -2541,6 +2675,10 @@ # error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++20" # endif +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined before c++2b" +# endif + # if !defined(_LIBCPP_VERSION) # ifndef __cpp_lib_constexpr_complex # error "__cpp_lib_constexpr_complex should be defined in c++20" @@ -3114,10 +3252,34 @@ # endif # endif +# ifdef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should not be defined before c++2b" +# endif + +# ifdef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_starts_ends_with # error "__cpp_lib_ranges_starts_ends_with should not be defined before c++2b" # endif +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined before c++2b" +# endif + # ifdef __cpp_lib_ranges_zip # error "__cpp_lib_ranges_zip should not be defined before c++2b" # endif @@ -3129,6 +3291,10 @@ # error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++20" # endif +# ifdef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should not be defined before c++2b" +# endif + # ifndef __cpp_lib_remove_cvref # error "__cpp_lib_remove_cvref should be defined in c++20" # endif @@ -3418,6 +3584,10 @@ # error "__cpp_lib_unordered_map_try_emplace should have the value 201411L in c++20" # endif +# ifdef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should not be defined before c++2b" +# endif + # ifndef __cpp_lib_unwrap_ref # error "__cpp_lib_unwrap_ref should be defined in c++20" # endif @@ -3622,6 +3792,19 @@ # endif # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should be defined in c++2b" +# endif +# if __cpp_lib_bind_back != 202202L +# error "__cpp_lib_bind_back should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_bind_back +# error "__cpp_lib_bind_back should not be defined because it is unimplemented in libc++!" +# endif +# endif + # ifndef __cpp_lib_bind_front # error "__cpp_lib_bind_front should be defined in c++2b" # endif @@ -3745,6 +3928,19 @@ # error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should be defined in c++2b" +# endif +# if __cpp_lib_constexpr_cmath != 202202L +# error "__cpp_lib_constexpr_cmath should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_constexpr_cmath +# error "__cpp_lib_constexpr_cmath should not be defined because it is unimplemented in libc++!" +# endif +# endif + # if !defined(_LIBCPP_VERSION) # ifndef __cpp_lib_constexpr_complex # error "__cpp_lib_constexpr_complex should be defined in c++2b" @@ -4360,6 +4556,71 @@ # endif # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should be defined in c++2b" +# endif +# if __cpp_lib_ranges_chunk != 202202L +# error "__cpp_lib_ranges_chunk should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_chunk +# error "__cpp_lib_ranges_chunk should not be defined because it is unimplemented in libc++!" +# endif +# endif + +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should be defined in c++2b" +# endif +# if __cpp_lib_ranges_chunk_by != 202202L +# error "__cpp_lib_ranges_chunk_by should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_chunk_by +# error "__cpp_lib_ranges_chunk_by should not be defined because it is unimplemented in libc++!" +# endif +# endif + +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should be defined in c++2b" +# endif +# if __cpp_lib_ranges_iota != 202202L +# error "__cpp_lib_ranges_iota should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_iota +# error "__cpp_lib_ranges_iota should not be defined because it is unimplemented in libc++!" +# endif +# endif + +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should be defined in c++2b" +# endif +# if __cpp_lib_ranges_join_with != 202202L +# error "__cpp_lib_ranges_join_with should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_join_with +# error "__cpp_lib_ranges_join_with should not be defined because it is unimplemented in libc++!" +# endif +# endif + +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should be defined in c++2b" +# endif +# if __cpp_lib_ranges_slide != 202202L +# error "__cpp_lib_ranges_slide should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_slide +# error "__cpp_lib_ranges_slide should not be defined because it is unimplemented in libc++!" +# endif +# endif + # if !defined(_LIBCPP_VERSION) # ifndef __cpp_lib_ranges_starts_ends_with # error "__cpp_lib_ranges_starts_ends_with should be defined in c++2b" @@ -4373,6 +4634,19 @@ # endif # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should be defined in c++2b" +# endif +# if __cpp_lib_ranges_to_container != 202202L +# error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_ranges_to_container +# error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" +# endif +# endif + # if !defined(_LIBCPP_VERSION) # ifndef __cpp_lib_ranges_zip # error "__cpp_lib_ranges_zip should be defined in c++2b" @@ -4393,6 +4667,19 @@ # error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should be defined in c++2b" +# endif +# if __cpp_lib_reference_from_temporary != 202202L +# error "__cpp_lib_reference_from_temporary should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_reference_from_temporary +# error "__cpp_lib_reference_from_temporary should not be defined because it is unimplemented in libc++!" +# endif +# endif + # ifndef __cpp_lib_remove_cvref # error "__cpp_lib_remove_cvref should be defined in c++2b" # endif @@ -4718,6 +5005,19 @@ # error "__cpp_lib_unordered_map_try_emplace should have the value 201411L in c++2b" # endif +# if !defined(_LIBCPP_VERSION) +# ifndef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should be defined in c++2b" +# endif +# if __cpp_lib_unreachable != 202202L +# error "__cpp_lib_unreachable should have the value 202202L in c++2b" +# endif +# else // _LIBCPP_VERSION +# ifdef __cpp_lib_unreachable +# error "__cpp_lib_unreachable should not be defined because it is unimplemented in libc++!" +# endif +# endif + # ifndef __cpp_lib_unwrap_ref # error "__cpp_lib_unwrap_ref should be defined in c++2b" # endif 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 @@ -148,6 +148,11 @@ "headers": ["barrier"], "test_suite_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)", "libcxx_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)", + }, { + "name": "__cpp_lib_bind_back", + "values": { "c++2b": 202202 }, + "headers": ["functional"], + "unimplemented": True, }, { "name": "__cpp_lib_bind_front", "values": { "c++20": 201907 }, @@ -212,6 +217,11 @@ "name": "__cpp_lib_constexpr_algorithms", "values": { "c++20": 201806 }, "headers": ["algorithm"], + }, { + "name": "__cpp_lib_constexpr_cmath", + "values": { "c++2b": 202202 }, + "headers": ["cmath", "cstdlib"], + "unimplemented": True, }, { "name": "__cpp_lib_constexpr_complex", "values": { "c++20": 201711 }, @@ -519,11 +529,41 @@ "values": { "c++20": 201811 }, "headers": ["algorithm", "functional", "iterator", "memory", "ranges"], "unimplemented": True, + }, { + "name": "__cpp_lib_ranges_chunk", + "values": { "c++2b": 202202 }, + "headers": ["ranges"], + "unimplemented": True, + }, { + "name": "__cpp_lib_ranges_chunk_by", + "values": { "c++2b": 202202 }, + "headers": ["ranges"], + "unimplemented": True, + }, { + "name": "__cpp_lib_ranges_iota", + "values": { "c++2b": 202202 }, + "headers": ["numeric"], + "unimplemented": True, + }, { + "name": "__cpp_lib_ranges_join_with", + "values": { "c++2b": 202202 }, + "headers": ["ranges"], + "unimplemented": True, + }, { + "name": "__cpp_lib_ranges_slide", + "values": { "c++2b": 202202 }, + "headers": ["ranges"], + "unimplemented": True, }, { "name": "__cpp_lib_ranges_starts_ends_with", "values": { "c++2b": 202106 }, "headers": ["algorithm"], "unimplemented": True, + }, { + "name": "__cpp_lib_ranges_to_container", + "values": { "c++2b": 202202 }, + "headers": ["deque", "forward_list", "list", "map", "priority_queue", "queue", "set", "stack", "string", "unordered_map", "unordered_set", "vector"], + "unimplemented": True, }, { "name": "__cpp_lib_ranges_zip", "values": { "c++2b": 202110 }, @@ -533,6 +573,11 @@ "name": "__cpp_lib_raw_memory_algorithms", "values": { "c++17": 201606 }, "headers": ["memory"], + }, { + "name": "__cpp_lib_reference_from_temporary", + "values": { "c++2b": 202202 }, + "headers": ["type_traits"], + "unimplemented": True, }, { "name": "__cpp_lib_remove_cvref", "values": { "c++20": 201711 }, @@ -695,6 +740,11 @@ "name": "__cpp_lib_unordered_map_try_emplace", "values": { "c++17": 201411 }, "headers": ["unordered_map"], + }, { + "name": "__cpp_lib_unreachable", + "values": { "c++2b": 202202 }, + "headers": ["utility"], + "unimplemented": True, }, { "name": "__cpp_lib_unwrap_ref", "values": { "c++20": 201811 },