diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h --- a/libcxx/include/__format/format_functions.h +++ b/libcxx/include/__format/format_functions.h @@ -10,8 +10,6 @@ #ifndef _LIBCPP___FORMAT_FORMAT_FUNCTIONS #define _LIBCPP___FORMAT_FORMAT_FUNCTIONS -// TODO FMT This is added to fix Apple back-deployment. -#include #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) #include <__algorithm/clamp.h> diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -1708,7 +1708,6 @@ #include <__debug> #include #include -#include #include <__algorithm/adjacent_find.h> #include <__algorithm/all_of.h> @@ -1921,6 +1920,36 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_robust_nonmodifying_seq_ops +# define __cpp_lib_robust_nonmodifying_seq_ops 201304 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_clamp +# define __cpp_lib_clamp 201603 + +# undef __cpp_lib_sample +# define __cpp_lib_sample 201603 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_constexpr_algorithms +# define __cpp_lib_constexpr_algorithms 201806 + +# undef __cpp_lib_ranges +# define __cpp_lib_ranges 202106 + +# undef __cpp_lib_shift +# define __cpp_lib_shift 201806 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_ALGORITHM diff --git a/libcxx/include/any b/libcxx/include/any --- a/libcxx/include/any +++ b/libcxx/include/any @@ -95,7 +95,6 @@ #include #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -707,6 +706,17 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_any +# define __cpp_lib_any 201606 +#endif // _LIBCPP_STD_VER >= 17 + +// ftm_list_end + #endif // _LIBCPP_ANY diff --git a/libcxx/include/array b/libcxx/include/array --- a/libcxx/include/array +++ b/libcxx/include/array @@ -121,7 +121,6 @@ #include <__utility/unreachable.h> #include #include -#include // standard-mandated includes @@ -537,6 +536,28 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_array_constexpr +# define __cpp_lib_array_constexpr 201603 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_array_constexpr +# define __cpp_lib_array_constexpr 201811 + +# undef __cpp_lib_to_array +# define __cpp_lib_to_array 201907 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_ARRAY diff --git a/libcxx/include/atomic b/libcxx/include/atomic --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -537,7 +537,6 @@ #include #include #include -#include #ifndef _LIBCPP_HAS_NO_THREADS # include <__threading_support> @@ -1522,7 +1521,7 @@ { mutable __cxx_atomic_impl<_Tp> __a_; -#if defined(__cpp_lib_atomic_is_always_lock_free) +#if _LIBCPP_STD_VER >= 17 static _LIBCPP_CONSTEXPR bool is_always_lock_free = __libcpp_is_always_lock_free<__cxx_atomic_impl<_Tp> >::__value; #endif @@ -2668,6 +2667,38 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_atomic_is_always_lock_free +# define __cpp_lib_atomic_is_always_lock_free 201603 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_atomic_flag_test +# define __cpp_lib_atomic_flag_test 201907 + +# undef __cpp_lib_atomic_lock_free_type_aliases +# define __cpp_lib_atomic_lock_free_type_aliases 201907 + +# undef __cpp_lib_atomic_value_initialization +# define __cpp_lib_atomic_value_initialization 201911 + +# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) +# undef __cpp_lib_atomic_wait +# define __cpp_lib_atomic_wait 201907 +# endif + +# if !defined(_LIBCPP_HAS_NO_CHAR8_T) +# undef __cpp_lib_char8_t +# define __cpp_lib_char8_t 201907 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_ATOMIC diff --git a/libcxx/include/barrier b/libcxx/include/barrier --- a/libcxx/include/barrier +++ b/libcxx/include/barrier @@ -336,4 +336,16 @@ # include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) +# undef __cpp_lib_barrier +# define __cpp_lib_barrier 201907 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif //_LIBCPP_BARRIER diff --git a/libcxx/include/bit b/libcxx/include/bit --- a/libcxx/include/bit +++ b/libcxx/include/bit @@ -76,7 +76,6 @@ #include <__bit/popcount.h> #include <__bit/rotate.h> #include <__config> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -86,6 +85,28 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_bit_cast +# define __cpp_lib_bit_cast 201806 + +# undef __cpp_lib_endian +# define __cpp_lib_endian 201907 + +# undef __cpp_lib_int_pow2 +# define __cpp_lib_int_pow2 202002 +#endif // _LIBCPP_STD_VER >= 20 + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_byteswap +# define __cpp_lib_byteswap 202110 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_BIT diff --git a/libcxx/include/bitset b/libcxx/include/bitset --- a/libcxx/include/bitset +++ b/libcxx/include/bitset @@ -122,7 +122,6 @@ #include #include #include -#include // standard-mandated includes @@ -1154,6 +1153,17 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_constexpr_bitset +# define __cpp_lib_constexpr_bitset 202207 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_BITSET diff --git a/libcxx/include/charconv b/libcxx/include/charconv --- a/libcxx/include/charconv +++ b/libcxx/include/charconv @@ -844,4 +844,14 @@ # include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_constexpr_charconv +# define __cpp_lib_constexpr_charconv 202207 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_CHARCONV diff --git a/libcxx/include/chrono b/libcxx/include/chrono --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -762,7 +762,6 @@ #include <__chrono/year_month_day.h> #include <__chrono/year_month_weekday.h> #include <__config> -#include // standard-mandated includes @@ -783,6 +782,22 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_chrono_udls +# define __cpp_lib_chrono_udls 201304 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_chrono +# define __cpp_lib_chrono 201611 +#endif // _LIBCPP_STD_VER >= 17 + +// ftm_list_end + #endif // _LIBCPP_CHRONO diff --git a/libcxx/include/cmath b/libcxx/include/cmath --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -312,7 +312,6 @@ #include <__type_traits/is_floating_point.h> #include <__type_traits/is_same.h> #include <__type_traits/remove_cv.h> -#include #include @@ -831,6 +830,22 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_hypot +# define __cpp_lib_hypot 201603 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_interpolate +# define __cpp_lib_interpolate 201902 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_CMATH diff --git a/libcxx/include/codecvt b/libcxx/include/codecvt --- a/libcxx/include/codecvt +++ b/libcxx/include/codecvt @@ -57,7 +57,6 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> #include <__locale> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -566,6 +565,7 @@ # include # include # include +# include #endif #endif // _LIBCPP_CODECVT diff --git a/libcxx/include/compare b/libcxx/include/compare --- a/libcxx/include/compare +++ b/libcxx/include/compare @@ -154,7 +154,6 @@ #include <__compare/three_way_comparable.h> #include <__compare/weak_order.h> #include <__config> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -162,6 +161,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif #endif // _LIBCPP_COMPARE diff --git a/libcxx/include/complex b/libcxx/include/complex --- a/libcxx/include/complex +++ b/libcxx/include/complex @@ -237,7 +237,6 @@ #include #include #include -#include #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include // for std::basic_ostringstream @@ -1565,4 +1564,23 @@ _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_complex_udls +# define __cpp_lib_complex_udls 201309 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_constexpr_complex +# define __cpp_lib_constexpr_complex 201711 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_COMPLEX diff --git a/libcxx/include/concepts b/libcxx/include/concepts --- a/libcxx/include/concepts +++ b/libcxx/include/concepts @@ -153,14 +153,24 @@ #include <__concepts/swappable.h> #include <__concepts/totally_ordered.h> #include <__config> -#include #if _LIBCPP_STD_VER <= 20 && !defined(_LIPCPP_REMOVE_TRANSITIVE_INCLUDES) # include +# include #endif #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_concepts +# define __cpp_lib_concepts 202002 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_CONCEPTS diff --git a/libcxx/include/condition_variable b/libcxx/include/condition_variable --- a/libcxx/include/condition_variable +++ b/libcxx/include/condition_variable @@ -111,7 +111,6 @@ #include <__memory/shared_ptr.h> #include <__memory/unique_ptr.h> #include <__mutex_base> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -271,6 +270,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include #endif #endif // _LIBCPP_CONDITION_VARIABLE diff --git a/libcxx/include/coroutine b/libcxx/include/coroutine --- a/libcxx/include/coroutine +++ b/libcxx/include/coroutine @@ -44,7 +44,6 @@ #include <__coroutine/coroutine_traits.h> #include <__coroutine/noop_coroutine_handle.h> #include <__coroutine/trivial_awaitables.h> -#include // standard-mandated includes @@ -58,6 +57,17 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_coroutine +# define __cpp_lib_coroutine 201902 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_COROUTINE diff --git a/libcxx/include/cstddef b/libcxx/include/cstddef --- a/libcxx/include/cstddef +++ b/libcxx/include/cstddef @@ -38,7 +38,6 @@ #include <__type_traits/enable_if.h> #include <__type_traits/integral_constant.h> #include <__type_traits/is_integral.h> -#include #include @@ -143,4 +142,18 @@ #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_byte +# define __cpp_lib_byte 201603 +#endif // _LIBCPP_STD_VER >= 17 + +// ftm_list_end + #endif // _LIBCPP_CSTDDEF diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -190,7 +190,6 @@ #include #include #include -#include // standard-mandated includes @@ -2438,6 +2437,25 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_erase_if +# define __cpp_lib_erase_if 202002 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_DEQUE diff --git a/libcxx/include/exception b/libcxx/include/exception --- a/libcxx/include/exception +++ b/libcxx/include/exception @@ -89,7 +89,6 @@ #include <__type_traits/is_polymorphic.h> #include #include -#include // defines its own std::exception and std::bad_exception types, // which we use in order to be ABI-compatible with other STLs on Windows. @@ -379,6 +378,17 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_uncaught_exceptions +# define __cpp_lib_uncaught_exceptions 201411 +#endif // _LIBCPP_STD_VER >= 17 + +// ftm_list_end + #endif // _LIBCPP_EXCEPTION diff --git a/libcxx/include/execution b/libcxx/include/execution --- a/libcxx/include/execution +++ b/libcxx/include/execution @@ -12,7 +12,6 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> -#include #if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17 # include <__pstl_execution> diff --git a/libcxx/include/expected b/libcxx/include/expected --- a/libcxx/include/expected +++ b/libcxx/include/expected @@ -44,11 +44,19 @@ #include <__expected/expected.h> #include <__expected/unexpect.h> #include <__expected/unexpected.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif -#endif // _LIBCPP_EXPECTED +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_expected +# define __cpp_lib_expected 202202 +#endif // _LIBCPP_STD_VER >= 23 +// ftm_list_end + +#endif // _LIBCPP_EXPECTED diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -447,7 +447,6 @@ #include <__filesystem/recursive_directory_iterator.h> #include <__filesystem/space_info.h> #include <__filesystem/u8path.h> -#include // standard-mandated includes @@ -464,6 +463,26 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) +# undef __cpp_lib_filesystem +# define __cpp_lib_filesystem 201703 +# endif +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# if !defined(_LIBCPP_HAS_NO_CHAR8_T) +# undef __cpp_lib_char8_t +# define __cpp_lib_char8_t 201907 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_FILESYSTEM diff --git a/libcxx/include/format b/libcxx/include/format --- a/libcxx/include/format +++ b/libcxx/include/format @@ -170,8 +170,7 @@ */ #include <__assert> // all public C++ headers provide the assertion handler -// Make sure all feature-test macros are available. -#include + // Enable the contents of the header only when libc++ was built with experimental features enabled. #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -202,7 +202,6 @@ #include <__utility/move.h> #include #include -#include // standard-mandated includes @@ -1798,6 +1797,31 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_incomplete_container_elements +# define __cpp_lib_incomplete_container_elements 201505 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_erase_if +# define __cpp_lib_erase_if 202002 + +# undef __cpp_lib_list_remove_return_type +# define __cpp_lib_list_remove_return_type 201806 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_FORWARD_LIST diff --git a/libcxx/include/fstream b/libcxx/include/fstream --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -193,7 +193,6 @@ #include #include #include -#include #if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) # include @@ -1758,6 +1757,7 @@ # include # include # include +# include #endif #endif // _LIBCPP_FSTREAM diff --git a/libcxx/include/functional b/libcxx/include/functional --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -535,7 +535,6 @@ #include // TODO: find out why removing this breaks the modules build #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -545,6 +544,48 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_result_of_sfinae +# define __cpp_lib_result_of_sfinae 201210 + +# undef __cpp_lib_transparent_operators +# define __cpp_lib_transparent_operators 201210 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_boyer_moore_searcher +# define __cpp_lib_boyer_moore_searcher 201603 + +# undef __cpp_lib_invoke +# define __cpp_lib_invoke 201411 + +# undef __cpp_lib_not_fn +# define __cpp_lib_not_fn 201603 + +# undef __cpp_lib_transparent_operators +# define __cpp_lib_transparent_operators 201510 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_bind_front +# define __cpp_lib_bind_front 201907 + +# undef __cpp_lib_constexpr_functional +# define __cpp_lib_constexpr_functional 201907 + +# undef __cpp_lib_ranges +# define __cpp_lib_ranges 202106 + +# undef __cpp_lib_unwrap_ref +# define __cpp_lib_unwrap_ref 201811 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_FUNCTIONAL diff --git a/libcxx/include/future b/libcxx/include/future --- a/libcxx/include/future +++ b/libcxx/include/future @@ -378,7 +378,6 @@ #include #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -2454,4 +2453,8 @@ # include #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_FUTURE diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip --- a/libcxx/include/iomanip +++ b/libcxx/include/iomanip @@ -45,7 +45,6 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -660,4 +659,18 @@ _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_quoted_string_io +# define __cpp_lib_quoted_string_io 201304 +#endif // _LIBCPP_STD_VER >= 14 + +// ftm_list_end + #endif // _LIBCPP_IOMANIP diff --git a/libcxx/include/ios b/libcxx/include/ios --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -221,7 +221,6 @@ #include <__locale> #include <__utility/swap.h> #include -#include // standard-mandated includes @@ -1049,6 +1048,7 @@ # include # include # include +# include #endif #endif // _LIBCPP_IOS diff --git a/libcxx/include/iosfwd b/libcxx/include/iosfwd --- a/libcxx/include/iosfwd +++ b/libcxx/include/iosfwd @@ -98,7 +98,6 @@ #include <__config> #include <__fwd/string.h> #include <__mbstate_t.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -263,4 +262,8 @@ _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_IOSFWD diff --git a/libcxx/include/iostream b/libcxx/include/iostream --- a/libcxx/include/iostream +++ b/libcxx/include/iostream @@ -35,7 +35,6 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> -#include // standard-mandated includes @@ -65,4 +64,8 @@ _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_IOSTREAM diff --git a/libcxx/include/istream b/libcxx/include/istream --- a/libcxx/include/istream +++ b/libcxx/include/istream @@ -163,7 +163,6 @@ #include <__iterator/istreambuf_iterator.h> #include <__utility/forward.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -1640,8 +1639,21 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include #endif _LIBCPP_POP_MACROS +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# if !defined(_LIBCPP_HAS_NO_CHAR8_T) +# undef __cpp_lib_char8_t +# define __cpp_lib_char8_t 201907 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_ISTREAM diff --git a/libcxx/include/iterator b/libcxx/include/iterator --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -719,7 +719,6 @@ #include <__memory/pointer_traits.h> #include #include -#include // standard-mandated includes @@ -737,6 +736,42 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_make_reverse_iterator +# define __cpp_lib_make_reverse_iterator 201402 + +# undef __cpp_lib_null_iterators +# define __cpp_lib_null_iterators 201304 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_array_constexpr +# define __cpp_lib_array_constexpr 201603 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_array_constexpr +# define __cpp_lib_array_constexpr 201811 + +# undef __cpp_lib_constexpr_iterator +# define __cpp_lib_constexpr_iterator 201811 + +# undef __cpp_lib_ranges +# define __cpp_lib_ranges 202106 + +# undef __cpp_lib_ssize +# define __cpp_lib_ssize 201902 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_ITERATOR diff --git a/libcxx/include/latch b/libcxx/include/latch --- a/libcxx/include/latch +++ b/libcxx/include/latch @@ -45,7 +45,6 @@ #include <__config> #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -111,4 +110,20 @@ _LIBCPP_POP_MACROS +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) +# undef __cpp_lib_latch +# define __cpp_lib_latch 201907 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif //_LIBCPP_LATCH diff --git a/libcxx/include/limits b/libcxx/include/limits --- a/libcxx/include/limits +++ b/libcxx/include/limits @@ -114,7 +114,6 @@ _LIBCPP_PUSH_MACROS #include <__undef_macros> -#include _LIBCPP_BEGIN_NAMESPACE_STD @@ -825,6 +824,19 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# if !defined(_LIBCPP_HAS_NO_CHAR8_T) +# undef __cpp_lib_char8_t +# define __cpp_lib_char8_t 201907 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_LIMITS diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -210,7 +210,6 @@ #include #include #include -#include // standard-mandated includes @@ -2381,6 +2380,31 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_incomplete_container_elements +# define __cpp_lib_incomplete_container_elements 201505 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_erase_if +# define __cpp_lib_erase_if 202002 + +# undef __cpp_lib_list_remove_return_type +# define __cpp_lib_list_remove_return_type 201806 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_LIST diff --git a/libcxx/include/locale b/libcxx/include/locale --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -209,7 +209,6 @@ #include #include #include -#include // TODO: Fix __bsd_locale_defaults.h // NOLINTBEGIN(libcpp-robust-against-adl) @@ -4363,6 +4362,19 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# if !defined(_LIBCPP_HAS_NO_CHAR8_T) +# undef __cpp_lib_char8_t +# define __cpp_lib_char8_t 201907 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_LOCALE diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -548,7 +548,6 @@ #include <__utility/swap.h> #include #include -#include // standard-mandated includes @@ -2356,6 +2355,36 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_generic_associative_lookup +# define __cpp_lib_generic_associative_lookup 201304 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_map_try_emplace +# define __cpp_lib_map_try_emplace 201411 + +# undef __cpp_lib_node_extract +# define __cpp_lib_node_extract 201606 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_erase_if +# define __cpp_lib_erase_if 202002 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_MAP diff --git a/libcxx/include/memory b/libcxx/include/memory --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -884,7 +884,6 @@ #include <__memory/unique_ptr.h> #include <__memory/uses_allocator.h> #include <__memory/uses_allocator_construction.h> -#include // standard-mandated includes @@ -912,6 +911,74 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_make_unique +# define __cpp_lib_make_unique 201304 + +# undef __cpp_lib_transparent_operators +# define __cpp_lib_transparent_operators 201210 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_addressof_constexpr +# define __cpp_lib_addressof_constexpr 201603 + +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_enable_shared_from_this +# define __cpp_lib_enable_shared_from_this 201603 + +# undef __cpp_lib_raw_memory_algorithms +# define __cpp_lib_raw_memory_algorithms 201606 + +# undef __cpp_lib_shared_ptr_arrays +# define __cpp_lib_shared_ptr_arrays 201611 + +# undef __cpp_lib_shared_ptr_weak_type +# define __cpp_lib_shared_ptr_weak_type 201606 + +# undef __cpp_lib_transparent_operators +# define __cpp_lib_transparent_operators 201510 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_assume_aligned +# define __cpp_lib_assume_aligned 201811 + +# undef __cpp_lib_atomic_value_initialization +# define __cpp_lib_atomic_value_initialization 201911 + +# undef __cpp_lib_constexpr_dynamic_alloc +# define __cpp_lib_constexpr_dynamic_alloc 201907 + +# undef __cpp_lib_constexpr_memory +# define __cpp_lib_constexpr_memory 201811 + +# undef __cpp_lib_ranges +# define __cpp_lib_ranges 202106 + +# undef __cpp_lib_shared_ptr_arrays +# define __cpp_lib_shared_ptr_arrays 201707 + +# undef __cpp_lib_to_address +# define __cpp_lib_to_address 201711 +#endif // _LIBCPP_STD_VER >= 20 + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_allocate_at_least +# define __cpp_lib_allocate_at_least 202106 + +# undef __cpp_lib_constexpr_memory +# define __cpp_lib_constexpr_memory 202202 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_MEMORY diff --git a/libcxx/include/memory_resource b/libcxx/include/memory_resource --- a/libcxx/include/memory_resource +++ b/libcxx/include/memory_resource @@ -56,10 +56,24 @@ #include <__memory_resource/pool_options.h> #include <__memory_resource/synchronized_pool_resource.h> #include <__memory_resource/unsynchronized_pool_resource.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_memory_resource +# define __cpp_lib_memory_resource 201603 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_polymorphic_allocator +# define __cpp_lib_polymorphic_allocator 201902 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif /* _LIBCPP_MEMORY_RESOURCE */ diff --git a/libcxx/include/mutex b/libcxx/include/mutex --- a/libcxx/include/mutex +++ b/libcxx/include/mutex @@ -196,7 +196,6 @@ #ifndef _LIBCPP_CXX03_LANG # include #endif -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -707,6 +706,17 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_scoped_lock +# define __cpp_lib_scoped_lock 201703 +#endif // _LIBCPP_STD_VER >= 17 + +// ftm_list_end + #endif // _LIBCPP_MUTEX diff --git a/libcxx/include/new b/libcxx/include/new --- a/libcxx/include/new +++ b/libcxx/include/new @@ -95,7 +95,6 @@ #include #include #include -#include #if defined(_LIBCPP_ABI_VCRUNTIME) #include @@ -405,6 +404,29 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# if defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE) +# undef __cpp_lib_hardware_interference_size +# define __cpp_lib_hardware_interference_size 201703 +# endif + +# undef __cpp_lib_launder +# define __cpp_lib_launder 201606 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# if _LIBCPP_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L +# undef __cpp_lib_destroying_delete +# define __cpp_lib_destroying_delete 201806 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_NEW diff --git a/libcxx/include/numbers b/libcxx/include/numbers --- a/libcxx/include/numbers +++ b/libcxx/include/numbers @@ -61,7 +61,6 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__concepts/arithmetic.h> #include <__config> -#include #if _LIBCPP_STD_VER > 17 @@ -133,6 +132,17 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_math_constants +# define __cpp_lib_math_constants 201907 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_NUMBERS diff --git a/libcxx/include/numeric b/libcxx/include/numeric --- a/libcxx/include/numeric +++ b/libcxx/include/numeric @@ -147,7 +147,6 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> #include // for isnormal -#include #include <__numeric/accumulate.h> #include <__numeric/adjacent_difference.h> @@ -176,6 +175,25 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_gcd_lcm +# define __cpp_lib_gcd_lcm 201606 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_constexpr_numeric +# define __cpp_lib_constexpr_numeric 201911 + +# undef __cpp_lib_interpolate +# define __cpp_lib_interpolate 201902 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_NUMERIC diff --git a/libcxx/include/optional b/libcxx/include/optional --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -175,7 +175,6 @@ #include #include #include -#include // standard-mandated includes @@ -1586,6 +1585,22 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_optional +# define __cpp_lib_optional 201606 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_optional +# define __cpp_lib_optional 202110 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_OPTIONAL diff --git a/libcxx/include/ostream b/libcxx/include/ostream --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -172,7 +172,6 @@ #include #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -1192,6 +1191,19 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# if !defined(_LIBCPP_HAS_NO_CHAR8_T) +# undef __cpp_lib_char8_t +# define __cpp_lib_char8_t 201907 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_OSTREAM diff --git a/libcxx/include/queue b/libcxx/include/queue --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -229,7 +229,6 @@ #include #include #include -#include // standard-mandated includes @@ -965,6 +964,17 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_adaptor_iterator_pair_constructor +# define __cpp_lib_adaptor_iterator_pair_constructor 202106 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_QUEUE diff --git a/libcxx/include/random b/libcxx/include/random --- a/libcxx/include/random +++ b/libcxx/include/random @@ -1716,7 +1716,6 @@ #include <__random/uniform_random_bit_generator.h> #include <__random/uniform_real_distribution.h> #include <__random/weibull_distribution.h> -#include // standard-mandated includes @@ -1740,6 +1739,7 @@ # include # include # include +# include #endif #endif // _LIBCPP_RANDOM diff --git a/libcxx/include/ranges b/libcxx/include/ranges --- a/libcxx/include/ranges +++ b/libcxx/include/ranges @@ -368,7 +368,6 @@ #include <__ranges/views.h> #include <__ranges/zip_view.h> #include -#include #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) #include <__ranges/istream_view.h> @@ -389,4 +388,14 @@ # pragma GCC system_header #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_ranges +# define __cpp_lib_ranges 202106 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_RANGES diff --git a/libcxx/include/ratio b/libcxx/include/ratio --- a/libcxx/include/ratio +++ b/libcxx/include/ratio @@ -82,7 +82,6 @@ #include <__type_traits/integral_constant.h> #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -527,6 +526,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif #endif // _LIBCPP_RATIO diff --git a/libcxx/include/regex b/libcxx/include/regex --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -778,7 +778,6 @@ #include #include #include -#include // standard-mandated includes @@ -6871,6 +6870,17 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 +#endif // _LIBCPP_STD_VER >= 17 + +// ftm_list_end + #endif // _LIBCPP_REGEX diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator --- a/libcxx/include/scoped_allocator +++ b/libcxx/include/scoped_allocator @@ -124,7 +124,6 @@ #include <__utility/pair.h> #include <__utility/piecewise_construct.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -728,6 +727,17 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 +#endif // _LIBCPP_STD_VER >= 17 + +// ftm_list_end + #endif // _LIBCPP_SCOPED_ALLOCATOR diff --git a/libcxx/include/semaphore b/libcxx/include/semaphore --- a/libcxx/include/semaphore +++ b/libcxx/include/semaphore @@ -53,7 +53,6 @@ #include <__threading_support> #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -188,4 +187,20 @@ _LIBCPP_POP_MACROS +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) +# undef __cpp_lib_semaphore +# define __cpp_lib_semaphore 201907 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif //_LIBCPP_SEMAPHORE diff --git a/libcxx/include/set b/libcxx/include/set --- a/libcxx/include/set +++ b/libcxx/include/set @@ -486,7 +486,6 @@ #include <__tree> #include <__type_traits/is_allocator.h> #include <__utility/forward.h> -#include // standard-mandated includes @@ -1600,6 +1599,33 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_generic_associative_lookup +# define __cpp_lib_generic_associative_lookup 201304 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_node_extract +# define __cpp_lib_node_extract 201606 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_erase_if +# define __cpp_lib_erase_if 202002 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_SET diff --git a/libcxx/include/shared_mutex b/libcxx/include/shared_mutex --- a/libcxx/include/shared_mutex +++ b/libcxx/include/shared_mutex @@ -125,7 +125,6 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__availability> #include <__config> -#include _LIBCPP_PUSH_MACROS #include <__undef_macros> @@ -506,4 +505,27 @@ _LIBCPP_POP_MACROS +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) +# undef __cpp_lib_shared_timed_mutex +# define __cpp_lib_shared_timed_mutex 201402 +# endif +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) +# undef __cpp_lib_shared_mutex +# define __cpp_lib_shared_mutex 201505 +# endif +#endif // _LIBCPP_STD_VER >= 17 + +// ftm_list_end + #endif // _LIBCPP_SHARED_MUTEX diff --git a/libcxx/include/source_location b/libcxx/include/source_location --- a/libcxx/include/source_location +++ b/libcxx/include/source_location @@ -27,7 +27,6 @@ #include <__config> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -82,4 +81,16 @@ _LIBCPP_END_NAMESPACE_STD +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# if __has_builtin(__builtin_source_location) +# undef __cpp_lib_source_location +# define __cpp_lib_source_location 201907 +# endif +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_SOURCE_LOCATION diff --git a/libcxx/include/span b/libcxx/include/span --- a/libcxx/include/span +++ b/libcxx/include/span @@ -146,7 +146,6 @@ #include // for byte #include #include // for remove_cv, etc -#include // standard-mandated includes @@ -593,6 +592,17 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_span +# define __cpp_lib_span 202002 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_SPAN diff --git a/libcxx/include/sstream b/libcxx/include/sstream --- a/libcxx/include/sstream +++ b/libcxx/include/sstream @@ -191,7 +191,6 @@ #include #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -878,6 +877,7 @@ #if _LIBCPP_STD_VER <= 20 && !defined(_LIPCPP_REMOVE_TRANSITIVE_INCLUDES) # include +# include #endif #endif // _LIBCPP_SSTREAM diff --git a/libcxx/include/stack b/libcxx/include/stack --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -105,7 +105,6 @@ #include <__utility/forward.h> #include #include -#include // standard-mandated includes @@ -366,6 +365,17 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_adaptor_iterator_pair_constructor +# define __cpp_lib_adaptor_iterator_pair_constructor 202106 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_STACK diff --git a/libcxx/include/stdatomic.h b/libcxx/include/stdatomic.h --- a/libcxx/include/stdatomic.h +++ b/libcxx/include/stdatomic.h @@ -124,7 +124,6 @@ #if defined(__cplusplus) && _LIBCPP_STD_VER > 20 #include -#include #ifdef _Atomic # undef _Atomic @@ -220,6 +219,20 @@ using std::atomic_signal_fence _LIBCPP_USING_IF_EXISTS; using std::atomic_thread_fence _LIBCPP_USING_IF_EXISTS; +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_stdatomic_h +# define __cpp_lib_stdatomic_h 202011 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #elif defined(_LIBCPP_COMPILER_CLANG_BASED) // Before C++23, we include the next on the path to avoid hijacking diff --git a/libcxx/include/streambuf b/libcxx/include/streambuf --- a/libcxx/include/streambuf +++ b/libcxx/include/streambuf @@ -112,7 +112,6 @@ #include #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -500,4 +499,8 @@ _LIBCPP_POP_MACROS +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_STREAMBUF diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -575,7 +575,6 @@ #include #include #include -#include #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS # include @@ -4628,6 +4627,55 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_string_udls +# define __cpp_lib_string_udls 201304 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 + +# undef __cpp_lib_string_view +# define __cpp_lib_string_view 201606 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# if !defined(_LIBCPP_HAS_NO_CHAR8_T) +# undef __cpp_lib_char8_t +# define __cpp_lib_char8_t 201907 +# endif + +# undef __cpp_lib_constexpr_string +# define __cpp_lib_constexpr_string 201907 + +# undef __cpp_lib_erase_if +# define __cpp_lib_erase_if 202002 + +# undef __cpp_lib_starts_ends_with +# define __cpp_lib_starts_ends_with 201711 + +# undef __cpp_lib_string_view +# define __cpp_lib_string_view 201803 +#endif // _LIBCPP_STD_VER >= 20 + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_string_contains +# define __cpp_lib_string_contains 202011 + +# undef __cpp_lib_string_resize_and_overwrite +# define __cpp_lib_string_resize_and_overwrite 202110 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_STRING diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -222,7 +222,6 @@ #include #include #include -#include // standard-mandated includes @@ -1026,6 +1025,38 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_string_view +# define __cpp_lib_string_view 201606 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# if !defined(_LIBCPP_HAS_NO_CHAR8_T) +# undef __cpp_lib_char8_t +# define __cpp_lib_char8_t 201907 +# endif + +# undef __cpp_lib_constexpr_string_view +# define __cpp_lib_constexpr_string_view 201811 + +# undef __cpp_lib_starts_ends_with +# define __cpp_lib_starts_ends_with 201711 + +# undef __cpp_lib_string_view +# define __cpp_lib_string_view 201803 +#endif // _LIBCPP_STD_VER >= 20 + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_string_contains +# define __cpp_lib_string_contains 202011 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_STRING_VIEW diff --git a/libcxx/include/strstream b/libcxx/include/strstream --- a/libcxx/include/strstream +++ b/libcxx/include/strstream @@ -133,7 +133,6 @@ #include <__config> #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -406,4 +405,8 @@ _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_STRSTREAM diff --git a/libcxx/include/system_error b/libcxx/include/system_error --- a/libcxx/include/system_error +++ b/libcxx/include/system_error @@ -153,7 +153,6 @@ #include #include #include -#include // standard-mandated includes @@ -545,4 +544,8 @@ _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_SYSTEM_ERROR diff --git a/libcxx/include/thread b/libcxx/include/thread --- a/libcxx/include/thread +++ b/libcxx/include/thread @@ -97,7 +97,6 @@ #include #include #include -#include // standard-mandated includes @@ -416,6 +415,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif #endif // _LIBCPP_THREAD diff --git a/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -251,7 +251,6 @@ #include <__utility/piecewise_construct.h> #include <__utility/swap.h> #include -#include // standard-mandated includes @@ -1858,6 +1857,33 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_tuple_element_t +# define __cpp_lib_tuple_element_t 201402 + +# undef __cpp_lib_tuples_by_type +# define __cpp_lib_tuples_by_type 201304 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_apply +# define __cpp_lib_apply 201603 + +# undef __cpp_lib_make_from_tuple +# define __cpp_lib_make_from_tuple 201606 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_constexpr_tuple +# define __cpp_lib_constexpr_tuple 201811 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_TUPLE diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -536,10 +536,83 @@ #include <__utility/declval.h> #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_integral_constant_callable +# define __cpp_lib_integral_constant_callable 201304 + +# undef __cpp_lib_is_final +# define __cpp_lib_is_final 201402 + +# undef __cpp_lib_is_null_pointer +# define __cpp_lib_is_null_pointer 201309 + +# undef __cpp_lib_result_of_sfinae +# define __cpp_lib_result_of_sfinae 201210 + +# undef __cpp_lib_transformation_trait_aliases +# define __cpp_lib_transformation_trait_aliases 201304 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_bool_constant +# define __cpp_lib_bool_constant 201505 + +# undef __cpp_lib_has_unique_object_representations +# define __cpp_lib_has_unique_object_representations 201606 + +# undef __cpp_lib_is_aggregate +# define __cpp_lib_is_aggregate 201703 + +# undef __cpp_lib_is_invocable +# define __cpp_lib_is_invocable 201703 + +# undef __cpp_lib_is_swappable +# define __cpp_lib_is_swappable 201603 + +# undef __cpp_lib_logical_traits +# define __cpp_lib_logical_traits 201510 + +# undef __cpp_lib_type_trait_variable_templates +# define __cpp_lib_type_trait_variable_templates 201510 + +# undef __cpp_lib_void_t +# define __cpp_lib_void_t 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_bounded_array_traits +# define __cpp_lib_bounded_array_traits 201902 + +# undef __cpp_lib_is_constant_evaluated +# define __cpp_lib_is_constant_evaluated 201811 + +# undef __cpp_lib_is_nothrow_convertible +# define __cpp_lib_is_nothrow_convertible 201806 + +# undef __cpp_lib_remove_cvref +# define __cpp_lib_remove_cvref 201711 + +# undef __cpp_lib_type_identity +# define __cpp_lib_type_identity 201806 +#endif // _LIBCPP_STD_VER >= 20 + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_is_scoped_enum +# define __cpp_lib_is_scoped_enum 202011 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_TYPE_TRAITS diff --git a/libcxx/include/typeindex b/libcxx/include/typeindex --- a/libcxx/include/typeindex +++ b/libcxx/include/typeindex @@ -49,7 +49,6 @@ #include <__config> #include <__functional/unary_function.h> #include -#include // standard-mandated includes #include @@ -121,6 +120,7 @@ # include # include # include +# include #endif #endif // _LIBCPP_TYPEINDEX diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -532,7 +532,6 @@ #include <__utility/forward.h> #include #include -#include // standard-mandated includes @@ -2648,6 +2647,34 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_node_extract +# define __cpp_lib_node_extract 201606 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 + +# undef __cpp_lib_unordered_map_try_emplace +# define __cpp_lib_unordered_map_try_emplace 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_erase_if +# define __cpp_lib_erase_if 202002 + +# undef __cpp_lib_generic_unordered_lookup +# define __cpp_lib_generic_unordered_lookup 201811 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_UNORDERED_MAP diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -475,7 +475,6 @@ #include <__node_handle> #include <__type_traits/is_allocator.h> #include <__utility/forward.h> -#include // standard-mandated includes @@ -1819,6 +1818,31 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_node_extract +# define __cpp_lib_node_extract 201606 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_erase_if +# define __cpp_lib_erase_if 202002 + +# undef __cpp_lib_generic_unordered_lookup +# define __cpp_lib_generic_unordered_lookup 201811 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_UNORDERED_SET diff --git a/libcxx/include/utility b/libcxx/include/utility --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -257,7 +257,6 @@ #include <__utility/to_underlying.h> #include <__utility/transaction.h> #include <__utility/unreachable.h> -#include // standard-mandated includes @@ -277,6 +276,50 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_exchange_function +# define __cpp_lib_exchange_function 201304 + +# undef __cpp_lib_integer_sequence +# define __cpp_lib_integer_sequence 201304 + +# undef __cpp_lib_tuples_by_type +# define __cpp_lib_tuples_by_type 201304 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_as_const +# define __cpp_lib_as_const 201510 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_constexpr_algorithms +# define __cpp_lib_constexpr_algorithms 201806 + +# undef __cpp_lib_constexpr_utility +# define __cpp_lib_constexpr_utility 201811 + +# undef __cpp_lib_integer_comparison_functions +# define __cpp_lib_integer_comparison_functions 202002 +#endif // _LIBCPP_STD_VER >= 20 + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_forward_like +# define __cpp_lib_forward_like 202207 + +# undef __cpp_lib_to_underlying +# define __cpp_lib_to_underlying 202102 + +# undef __cpp_lib_unreachable +# define __cpp_lib_unreachable 202202 +#endif // _LIBCPP_STD_VER >= 23 + +// ftm_list_end + #endif // _LIBCPP_UTILITY diff --git a/libcxx/include/valarray b/libcxx/include/valarray --- a/libcxx/include/valarray +++ b/libcxx/include/valarray @@ -359,7 +359,6 @@ #include #include #include -#include // standard-mandated includes @@ -4935,6 +4934,7 @@ # include # include # include +# include #endif #endif // _LIBCPP_VALARRAY diff --git a/libcxx/include/variant b/libcxx/include/variant --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -241,7 +241,6 @@ #include #include #include -#include // standard-mandated includes @@ -1834,6 +1833,17 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_variant +# define __cpp_lib_variant 202102 +#endif // _LIBCPP_STD_VER >= 17 + +// ftm_list_end + #endif // _LIBCPP_VARIANT diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -319,7 +319,6 @@ #include #include #include -#include // standard-mandated includes @@ -3361,6 +3360,31 @@ # include # include # include +# include #endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_incomplete_container_elements +# define __cpp_lib_incomplete_container_elements 201505 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_constexpr_vector +# define __cpp_lib_constexpr_vector 201907 + +# undef __cpp_lib_erase_if +# define __cpp_lib_erase_if 202002 +#endif // _LIBCPP_STD_VER >= 20 + +// ftm_list_end + #endif // _LIBCPP_VECTOR diff --git a/libcxx/include/version b/libcxx/include/version --- a/libcxx/include/version +++ b/libcxx/include/version @@ -145,10 +145,7 @@ __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_to_container 202202L __cpp_lib_ranges_zip 202110L __cpp_lib_raw_memory_algorithms 201606L __cpp_lib_reference_from_temporary 202202L @@ -206,219 +203,435 @@ # pragma GCC system_header #endif -// clang-format off - -#if _LIBCPP_STD_VER > 11 -# define __cpp_lib_chrono_udls 201304L -# define __cpp_lib_complex_udls 201309L -# define __cpp_lib_exchange_function 201304L -# define __cpp_lib_generic_associative_lookup 201304L -# define __cpp_lib_integer_sequence 201304L -# define __cpp_lib_integral_constant_callable 201304L -# define __cpp_lib_is_final 201402L -# define __cpp_lib_is_null_pointer 201309L -# define __cpp_lib_make_reverse_iterator 201402L -# define __cpp_lib_make_unique 201304L -# define __cpp_lib_null_iterators 201304L -# define __cpp_lib_quoted_string_io 201304L -# define __cpp_lib_result_of_sfinae 201210L -# define __cpp_lib_robust_nonmodifying_seq_ops 201304L -# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) -# define __cpp_lib_shared_timed_mutex 201402L -# endif -# define __cpp_lib_string_udls 201304L -# define __cpp_lib_transformation_trait_aliases 201304L -# define __cpp_lib_transparent_operators 201210L -# define __cpp_lib_tuple_element_t 201402L -# define __cpp_lib_tuples_by_type 201304L -#endif +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin -#if _LIBCPP_STD_VER > 14 -# define __cpp_lib_addressof_constexpr 201603L -# define __cpp_lib_allocator_traits_is_always_equal 201411L -# define __cpp_lib_any 201606L -# define __cpp_lib_apply 201603L -# define __cpp_lib_array_constexpr 201603L -# define __cpp_lib_as_const 201510L -# define __cpp_lib_atomic_is_always_lock_free 201603L -# define __cpp_lib_bool_constant 201505L -# define __cpp_lib_boyer_moore_searcher 201603L -# define __cpp_lib_byte 201603L -# define __cpp_lib_chrono 201611L -# define __cpp_lib_clamp 201603L -# define __cpp_lib_enable_shared_from_this 201603L -// # define __cpp_lib_execution 201603L -# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) -# define __cpp_lib_filesystem 201703L -# endif -# define __cpp_lib_gcd_lcm 201606L -# if defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE) -# define __cpp_lib_hardware_interference_size 201703L -# endif -# define __cpp_lib_has_unique_object_representations 201606L -# define __cpp_lib_hypot 201603L -# define __cpp_lib_incomplete_container_elements 201505L -# define __cpp_lib_invoke 201411L -# define __cpp_lib_is_aggregate 201703L -# define __cpp_lib_is_invocable 201703L -# define __cpp_lib_is_swappable 201603L -# define __cpp_lib_launder 201606L -# define __cpp_lib_logical_traits 201510L -# define __cpp_lib_make_from_tuple 201606L -# define __cpp_lib_map_try_emplace 201411L -// # define __cpp_lib_math_special_functions 201603L -# define __cpp_lib_memory_resource 201603L -# define __cpp_lib_node_extract 201606L -# define __cpp_lib_nonmember_container_access 201411L -# define __cpp_lib_not_fn 201603L -# define __cpp_lib_optional 201606L -// # define __cpp_lib_parallel_algorithm 201603L -# define __cpp_lib_raw_memory_algorithms 201606L -# define __cpp_lib_sample 201603L -# define __cpp_lib_scoped_lock 201703L -# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) -# define __cpp_lib_shared_mutex 201505L -# endif -# define __cpp_lib_shared_ptr_arrays 201611L -# define __cpp_lib_shared_ptr_weak_type 201606L -# define __cpp_lib_string_view 201606L -// # define __cpp_lib_to_chars 201611L -# undef __cpp_lib_transparent_operators -# define __cpp_lib_transparent_operators 201510L -# define __cpp_lib_type_trait_variable_templates 201510L -# define __cpp_lib_uncaught_exceptions 201411L -# define __cpp_lib_unordered_map_try_emplace 201411L -# define __cpp_lib_variant 202102L -# define __cpp_lib_void_t 201411L -#endif +#if _LIBCPP_STD_VER >= 14 +# undef __cpp_lib_chrono_udls +# define __cpp_lib_chrono_udls 201304 -#if _LIBCPP_STD_VER > 17 -# undef __cpp_lib_array_constexpr -# define __cpp_lib_array_constexpr 201811L -# define __cpp_lib_assume_aligned 201811L -# define __cpp_lib_atomic_flag_test 201907L -// # define __cpp_lib_atomic_float 201711L -# define __cpp_lib_atomic_lock_free_type_aliases 201907L -// # define __cpp_lib_atomic_ref 201806L -// # define __cpp_lib_atomic_shared_ptr 201711L -# define __cpp_lib_atomic_value_initialization 201911L -# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) -# define __cpp_lib_atomic_wait 201907L -# endif -# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) -# define __cpp_lib_barrier 201907L -# endif -# define __cpp_lib_bind_front 201907L -# define __cpp_lib_bit_cast 201806L -// # 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 -# endif -# define __cpp_lib_concepts 202002L -# define __cpp_lib_constexpr_algorithms 201806L -# define __cpp_lib_constexpr_complex 201711L -# define __cpp_lib_constexpr_dynamic_alloc 201907L -# define __cpp_lib_constexpr_functional 201907L -# define __cpp_lib_constexpr_iterator 201811L -# define __cpp_lib_constexpr_memory 201811L -# define __cpp_lib_constexpr_numeric 201911L -# define __cpp_lib_constexpr_string 201907L -# define __cpp_lib_constexpr_string_view 201811L -# define __cpp_lib_constexpr_tuple 201811L -# define __cpp_lib_constexpr_utility 201811L -# define __cpp_lib_constexpr_vector 201907L -# define __cpp_lib_coroutine 201902L -# if _LIBCPP_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L -# define __cpp_lib_destroying_delete 201806L -# endif -# define __cpp_lib_endian 201907L -# define __cpp_lib_erase_if 202002L -# undef __cpp_lib_execution -// # define __cpp_lib_execution 201902L -# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) -// # define __cpp_lib_format 202106L -# endif -# define __cpp_lib_generic_unordered_lookup 201811L -# define __cpp_lib_int_pow2 202002L -# define __cpp_lib_integer_comparison_functions 202002L -# define __cpp_lib_interpolate 201902L -# define __cpp_lib_is_constant_evaluated 201811L -// # define __cpp_lib_is_layout_compatible 201907L -# define __cpp_lib_is_nothrow_convertible 201806L -// # define __cpp_lib_is_pointer_interconvertible 201907L -# if !defined(_LIBCPP_HAS_NO_THREADS) -// # define __cpp_lib_jthread 201911L -# endif -# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) -# define __cpp_lib_latch 201907L -# endif -# define __cpp_lib_list_remove_return_type 201806L -# define __cpp_lib_math_constants 201907L -# define __cpp_lib_polymorphic_allocator 201902L -# define __cpp_lib_ranges 202106L -# define __cpp_lib_remove_cvref 201711L -# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) -# define __cpp_lib_semaphore 201907L -# endif -# undef __cpp_lib_shared_ptr_arrays -# define __cpp_lib_shared_ptr_arrays 201707L -# define __cpp_lib_shift 201806L -// # define __cpp_lib_smart_ptr_for_overwrite 202002L -# if __has_builtin(__builtin_source_location) -# define __cpp_lib_source_location 201907L -# endif -# define __cpp_lib_span 202002L -# define __cpp_lib_ssize 201902L -# define __cpp_lib_starts_ends_with 201711L -# undef __cpp_lib_string_view -# define __cpp_lib_string_view 201803L -// # define __cpp_lib_syncbuf 201803L -// # define __cpp_lib_three_way_comparison 201907L -# define __cpp_lib_to_address 201711L -# define __cpp_lib_to_array 201907L -# define __cpp_lib_type_identity 201806L -# define __cpp_lib_unwrap_ref 201811L -#endif +# undef __cpp_lib_complex_udls +# define __cpp_lib_complex_udls 201309 -#if _LIBCPP_STD_VER > 20 -# 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_bitset 202207L -# define __cpp_lib_constexpr_charconv 202207L -// # define __cpp_lib_constexpr_cmath 202202L -# undef __cpp_lib_constexpr_memory -# define __cpp_lib_constexpr_memory 202202L -// # define __cpp_lib_constexpr_typeinfo 202106L -# define __cpp_lib_expected 202202L -# define __cpp_lib_forward_like 202207L -// # define __cpp_lib_invoke_r 202106L -# define __cpp_lib_is_scoped_enum 202011L -// # define __cpp_lib_move_only_function 202110L -# undef __cpp_lib_optional -# define __cpp_lib_optional 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 +# undef __cpp_lib_exchange_function +# define __cpp_lib_exchange_function 201304 + +# undef __cpp_lib_generic_associative_lookup +# define __cpp_lib_generic_associative_lookup 201304 + +# undef __cpp_lib_integer_sequence +# define __cpp_lib_integer_sequence 201304 + +# undef __cpp_lib_integral_constant_callable +# define __cpp_lib_integral_constant_callable 201304 + +# undef __cpp_lib_is_final +# define __cpp_lib_is_final 201402 + +# undef __cpp_lib_is_null_pointer +# define __cpp_lib_is_null_pointer 201309 + +# undef __cpp_lib_make_reverse_iterator +# define __cpp_lib_make_reverse_iterator 201402 + +# undef __cpp_lib_make_unique +# define __cpp_lib_make_unique 201304 + +# undef __cpp_lib_null_iterators +# define __cpp_lib_null_iterators 201304 + +# undef __cpp_lib_quoted_string_io +# define __cpp_lib_quoted_string_io 201304 + +# undef __cpp_lib_result_of_sfinae +# define __cpp_lib_result_of_sfinae 201210 + +# undef __cpp_lib_robust_nonmodifying_seq_ops +# define __cpp_lib_robust_nonmodifying_seq_ops 201304 + +# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) +# undef __cpp_lib_shared_timed_mutex +# define __cpp_lib_shared_timed_mutex 201402 +# endif + +# undef __cpp_lib_string_udls +# define __cpp_lib_string_udls 201304 + +# undef __cpp_lib_transformation_trait_aliases +# define __cpp_lib_transformation_trait_aliases 201304 + +# undef __cpp_lib_transparent_operators +# define __cpp_lib_transparent_operators 201210 + +# undef __cpp_lib_tuple_element_t +# define __cpp_lib_tuple_element_t 201402 + +# undef __cpp_lib_tuples_by_type +# define __cpp_lib_tuples_by_type 201304 +#endif // _LIBCPP_STD_VER >= 14 + +#if _LIBCPP_STD_VER >= 17 +# undef __cpp_lib_addressof_constexpr +# define __cpp_lib_addressof_constexpr 201603 + +# undef __cpp_lib_allocator_traits_is_always_equal +# define __cpp_lib_allocator_traits_is_always_equal 201411 + +# undef __cpp_lib_any +# define __cpp_lib_any 201606 + +# undef __cpp_lib_apply +# define __cpp_lib_apply 201603 + +# undef __cpp_lib_array_constexpr +# define __cpp_lib_array_constexpr 201603 + +# undef __cpp_lib_as_const +# define __cpp_lib_as_const 201510 + +# undef __cpp_lib_atomic_is_always_lock_free +# define __cpp_lib_atomic_is_always_lock_free 201603 + +# undef __cpp_lib_bool_constant +# define __cpp_lib_bool_constant 201505 + +# undef __cpp_lib_boyer_moore_searcher +# define __cpp_lib_boyer_moore_searcher 201603 + +# undef __cpp_lib_byte +# define __cpp_lib_byte 201603 + +# undef __cpp_lib_chrono +# define __cpp_lib_chrono 201611 + +# undef __cpp_lib_clamp +# define __cpp_lib_clamp 201603 + +# undef __cpp_lib_enable_shared_from_this +# define __cpp_lib_enable_shared_from_this 201603 + +# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) +# undef __cpp_lib_filesystem +# define __cpp_lib_filesystem 201703 +# endif + +# undef __cpp_lib_gcd_lcm +# define __cpp_lib_gcd_lcm 201606 + +# if defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE) +# undef __cpp_lib_hardware_interference_size +# define __cpp_lib_hardware_interference_size 201703 +# endif + +# undef __cpp_lib_has_unique_object_representations +# define __cpp_lib_has_unique_object_representations 201606 + +# undef __cpp_lib_hypot +# define __cpp_lib_hypot 201603 + +# undef __cpp_lib_incomplete_container_elements +# define __cpp_lib_incomplete_container_elements 201505 + +# undef __cpp_lib_invoke +# define __cpp_lib_invoke 201411 + +# undef __cpp_lib_is_aggregate +# define __cpp_lib_is_aggregate 201703 + +# undef __cpp_lib_is_invocable +# define __cpp_lib_is_invocable 201703 + +# undef __cpp_lib_is_swappable +# define __cpp_lib_is_swappable 201603 + +# undef __cpp_lib_launder +# define __cpp_lib_launder 201606 + +# undef __cpp_lib_logical_traits +# define __cpp_lib_logical_traits 201510 + +# undef __cpp_lib_make_from_tuple +# define __cpp_lib_make_from_tuple 201606 + +# undef __cpp_lib_map_try_emplace +# define __cpp_lib_map_try_emplace 201411 + +# undef __cpp_lib_memory_resource +# define __cpp_lib_memory_resource 201603 + +# undef __cpp_lib_node_extract +# define __cpp_lib_node_extract 201606 + +# undef __cpp_lib_nonmember_container_access +# define __cpp_lib_nonmember_container_access 201411 + +# undef __cpp_lib_not_fn +# define __cpp_lib_not_fn 201603 + +# undef __cpp_lib_optional +# define __cpp_lib_optional 201606 + +# undef __cpp_lib_raw_memory_algorithms +# define __cpp_lib_raw_memory_algorithms 201606 + +# undef __cpp_lib_sample +# define __cpp_lib_sample 201603 + +# undef __cpp_lib_scoped_lock +# define __cpp_lib_scoped_lock 201703 + +# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) +# undef __cpp_lib_shared_mutex +# define __cpp_lib_shared_mutex 201505 +# endif + +# undef __cpp_lib_shared_ptr_arrays +# define __cpp_lib_shared_ptr_arrays 201611 + +# undef __cpp_lib_shared_ptr_weak_type +# define __cpp_lib_shared_ptr_weak_type 201606 + +# undef __cpp_lib_string_view +# define __cpp_lib_string_view 201606 + +# undef __cpp_lib_transparent_operators +# define __cpp_lib_transparent_operators 201510 + +# undef __cpp_lib_type_trait_variable_templates +# define __cpp_lib_type_trait_variable_templates 201510 + +# undef __cpp_lib_uncaught_exceptions +# define __cpp_lib_uncaught_exceptions 201411 + +# undef __cpp_lib_unordered_map_try_emplace +# define __cpp_lib_unordered_map_try_emplace 201411 + +# undef __cpp_lib_variant +# define __cpp_lib_variant 202102 + +# undef __cpp_lib_void_t +# define __cpp_lib_void_t 201411 +#endif // _LIBCPP_STD_VER >= 17 + +#if _LIBCPP_STD_VER >= 20 +# undef __cpp_lib_array_constexpr +# define __cpp_lib_array_constexpr 201811 + +# undef __cpp_lib_assume_aligned +# define __cpp_lib_assume_aligned 201811 + +# undef __cpp_lib_atomic_flag_test +# define __cpp_lib_atomic_flag_test 201907 + +# undef __cpp_lib_atomic_lock_free_type_aliases +# define __cpp_lib_atomic_lock_free_type_aliases 201907 + +# undef __cpp_lib_atomic_value_initialization +# define __cpp_lib_atomic_value_initialization 201911 + +# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) +# undef __cpp_lib_atomic_wait +# define __cpp_lib_atomic_wait 201907 +# endif + +# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) +# undef __cpp_lib_barrier +# define __cpp_lib_barrier 201907 +# endif + +# undef __cpp_lib_bind_front +# define __cpp_lib_bind_front 201907 + +# undef __cpp_lib_bit_cast +# define __cpp_lib_bit_cast 201806 + +# undef __cpp_lib_bounded_array_traits +# define __cpp_lib_bounded_array_traits 201902 + +# if !defined(_LIBCPP_HAS_NO_CHAR8_T) +# undef __cpp_lib_char8_t +# define __cpp_lib_char8_t 201907 +# endif + +# undef __cpp_lib_concepts +# define __cpp_lib_concepts 202002 + +# undef __cpp_lib_constexpr_algorithms +# define __cpp_lib_constexpr_algorithms 201806 + +# undef __cpp_lib_constexpr_complex +# define __cpp_lib_constexpr_complex 201711 + +# undef __cpp_lib_constexpr_dynamic_alloc +# define __cpp_lib_constexpr_dynamic_alloc 201907 + +# undef __cpp_lib_constexpr_functional +# define __cpp_lib_constexpr_functional 201907 + +# undef __cpp_lib_constexpr_iterator +# define __cpp_lib_constexpr_iterator 201811 + +# undef __cpp_lib_constexpr_memory +# define __cpp_lib_constexpr_memory 201811 + +# undef __cpp_lib_constexpr_numeric +# define __cpp_lib_constexpr_numeric 201911 + +# undef __cpp_lib_constexpr_string +# define __cpp_lib_constexpr_string 201907 + +# undef __cpp_lib_constexpr_string_view +# define __cpp_lib_constexpr_string_view 201811 + +# undef __cpp_lib_constexpr_tuple +# define __cpp_lib_constexpr_tuple 201811 + +# undef __cpp_lib_constexpr_utility +# define __cpp_lib_constexpr_utility 201811 + +# undef __cpp_lib_constexpr_vector +# define __cpp_lib_constexpr_vector 201907 + +# undef __cpp_lib_coroutine +# define __cpp_lib_coroutine 201902 + +# if _LIBCPP_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L +# undef __cpp_lib_destroying_delete +# define __cpp_lib_destroying_delete 201806 +# endif + +# undef __cpp_lib_endian +# define __cpp_lib_endian 201907 + +# undef __cpp_lib_erase_if +# define __cpp_lib_erase_if 202002 + +# undef __cpp_lib_generic_unordered_lookup +# define __cpp_lib_generic_unordered_lookup 201811 + +# undef __cpp_lib_int_pow2 +# define __cpp_lib_int_pow2 202002 + +# undef __cpp_lib_integer_comparison_functions +# define __cpp_lib_integer_comparison_functions 202002 + +# undef __cpp_lib_interpolate +# define __cpp_lib_interpolate 201902 + +# undef __cpp_lib_is_constant_evaluated +# define __cpp_lib_is_constant_evaluated 201811 + +# undef __cpp_lib_is_nothrow_convertible +# define __cpp_lib_is_nothrow_convertible 201806 + +# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) +# undef __cpp_lib_latch +# define __cpp_lib_latch 201907 +# endif + +# undef __cpp_lib_list_remove_return_type +# define __cpp_lib_list_remove_return_type 201806 + +# undef __cpp_lib_math_constants +# define __cpp_lib_math_constants 201907 + +# undef __cpp_lib_polymorphic_allocator +# define __cpp_lib_polymorphic_allocator 201902 + +# undef __cpp_lib_ranges +# define __cpp_lib_ranges 202106 + +# undef __cpp_lib_remove_cvref +# define __cpp_lib_remove_cvref 201711 + +# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) +# undef __cpp_lib_semaphore +# define __cpp_lib_semaphore 201907 +# endif + +# undef __cpp_lib_shared_ptr_arrays +# define __cpp_lib_shared_ptr_arrays 201707 + +# undef __cpp_lib_shift +# define __cpp_lib_shift 201806 + +# if __has_builtin(__builtin_source_location) +# undef __cpp_lib_source_location +# define __cpp_lib_source_location 201907 +# endif + +# undef __cpp_lib_span +# define __cpp_lib_span 202002 + +# undef __cpp_lib_ssize +# define __cpp_lib_ssize 201902 + +# undef __cpp_lib_starts_ends_with +# define __cpp_lib_starts_ends_with 201711 + +# undef __cpp_lib_string_view +# define __cpp_lib_string_view 201803 + +# undef __cpp_lib_to_address +# define __cpp_lib_to_address 201711 + +# undef __cpp_lib_to_array +# define __cpp_lib_to_array 201907 + +# undef __cpp_lib_type_identity +# define __cpp_lib_type_identity 201806 + +# undef __cpp_lib_unwrap_ref +# define __cpp_lib_unwrap_ref 201811 +#endif // _LIBCPP_STD_VER >= 20 + +#if _LIBCPP_STD_VER >= 23 +# undef __cpp_lib_adaptor_iterator_pair_constructor +# define __cpp_lib_adaptor_iterator_pair_constructor 202106 + +# undef __cpp_lib_allocate_at_least +# define __cpp_lib_allocate_at_least 202106 + +# undef __cpp_lib_byteswap +# define __cpp_lib_byteswap 202110 + +# undef __cpp_lib_constexpr_bitset +# define __cpp_lib_constexpr_bitset 202207 + +# undef __cpp_lib_constexpr_charconv +# define __cpp_lib_constexpr_charconv 202207 + +# undef __cpp_lib_constexpr_memory +# define __cpp_lib_constexpr_memory 202202 + +# undef __cpp_lib_expected +# define __cpp_lib_expected 202202 + +# undef __cpp_lib_forward_like +# define __cpp_lib_forward_like 202207 + +# undef __cpp_lib_is_scoped_enum +# define __cpp_lib_is_scoped_enum 202011 + +# undef __cpp_lib_optional +# define __cpp_lib_optional 202110 + +# undef __cpp_lib_stdatomic_h +# define __cpp_lib_stdatomic_h 202011 + +# undef __cpp_lib_string_contains +# define __cpp_lib_string_contains 202011 + +# undef __cpp_lib_string_resize_and_overwrite +# define __cpp_lib_string_resize_and_overwrite 202110 + +# undef __cpp_lib_to_underlying +# define __cpp_lib_to_underlying 202102 + +# undef __cpp_lib_unreachable +# define __cpp_lib_unreachable 202202 +#endif // _LIBCPP_STD_VER >= 23 -// clang-format on +// ftm_list_end #endif // _LIBCPP_VERSIONH diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv --- a/libcxx/test/libcxx/transitive_includes/cxx03.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv @@ -119,6 +119,8 @@ chrono type_traits chrono version cinttypes cstdint +cmath cstddef +cmath limits cmath type_traits cmath version codecvt atomic @@ -205,13 +207,11 @@ exception cstdlib exception type_traits exception version -execution version expected cstddef expected cstdlib expected exception expected initializer_list expected new -expected version experimental/algorithm algorithm experimental/algorithm cstddef experimental/algorithm type_traits @@ -362,7 +362,6 @@ format tuple format type_traits format vector -format version forward_list algorithm forward_list atomic forward_list compare @@ -569,7 +568,6 @@ memory_resource new memory_resource stdexcept memory_resource tuple -memory_resource version mutex atomic mutex concepts mutex cstddef @@ -681,7 +679,6 @@ ranges tuple ranges type_traits ranges variant -ranges version ratio climits ratio cstdint ratio type_traits @@ -748,7 +745,6 @@ set version shared_mutex version source_location cstdint -source_location version span array span concepts span cstddef diff --git a/libcxx/test/libcxx/transitive_includes/cxx11.csv b/libcxx/test/libcxx/transitive_includes/cxx11.csv --- a/libcxx/test/libcxx/transitive_includes/cxx11.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx11.csv @@ -119,6 +119,8 @@ chrono type_traits chrono version cinttypes cstdint +cmath cstddef +cmath limits cmath type_traits cmath version codecvt atomic @@ -205,13 +207,11 @@ exception cstdlib exception type_traits exception version -execution version expected cstddef expected cstdlib expected exception expected initializer_list expected new -expected version experimental/algorithm algorithm experimental/algorithm cstddef experimental/algorithm type_traits @@ -362,7 +362,6 @@ format tuple format type_traits format vector -format version forward_list algorithm forward_list atomic forward_list compare @@ -569,7 +568,6 @@ memory_resource new memory_resource stdexcept memory_resource tuple -memory_resource version mutex atomic mutex concepts mutex cstddef @@ -682,7 +680,6 @@ ranges tuple ranges type_traits ranges variant -ranges version ratio climits ratio cstdint ratio type_traits @@ -749,7 +746,6 @@ set version shared_mutex version source_location cstdint -source_location version span array span concepts span cstddef diff --git a/libcxx/test/libcxx/transitive_includes/cxx14.csv b/libcxx/test/libcxx/transitive_includes/cxx14.csv --- a/libcxx/test/libcxx/transitive_includes/cxx14.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx14.csv @@ -119,6 +119,8 @@ chrono type_traits chrono version cinttypes cstdint +cmath cstddef +cmath limits cmath type_traits cmath version codecvt atomic @@ -205,13 +207,11 @@ exception cstdlib exception type_traits exception version -execution version expected cstddef expected cstdlib expected exception expected initializer_list expected new -expected version experimental/algorithm algorithm experimental/algorithm cstddef experimental/algorithm type_traits @@ -364,7 +364,6 @@ format tuple format type_traits format vector -format version forward_list algorithm forward_list atomic forward_list compare @@ -571,7 +570,6 @@ memory_resource new memory_resource stdexcept memory_resource tuple -memory_resource version mutex atomic mutex concepts mutex cstddef @@ -684,7 +682,6 @@ ranges tuple ranges type_traits ranges variant -ranges version ratio climits ratio cstdint ratio type_traits @@ -758,7 +755,6 @@ shared_mutex type_traits shared_mutex version source_location cstdint -source_location version span array span concepts span cstddef diff --git a/libcxx/test/libcxx/transitive_includes/cxx17.csv b/libcxx/test/libcxx/transitive_includes/cxx17.csv --- a/libcxx/test/libcxx/transitive_includes/cxx17.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx17.csv @@ -119,6 +119,8 @@ chrono type_traits chrono version cinttypes cstdint +cmath cstddef +cmath limits cmath type_traits cmath version codecvt atomic @@ -205,13 +207,11 @@ exception cstdlib exception type_traits exception version -execution version expected cstddef expected cstdlib expected exception expected initializer_list expected new -expected version experimental/algorithm algorithm experimental/algorithm cstddef experimental/algorithm type_traits @@ -364,7 +364,6 @@ format tuple format type_traits format vector -format version forward_list algorithm forward_list atomic forward_list compare @@ -571,7 +570,6 @@ memory_resource new memory_resource stdexcept memory_resource tuple -memory_resource version mutex atomic mutex concepts mutex cstddef @@ -684,7 +682,6 @@ ranges tuple ranges type_traits ranges variant -ranges version ratio climits ratio cstdint ratio type_traits @@ -758,7 +755,6 @@ shared_mutex type_traits shared_mutex version source_location cstdint -source_location version span array span concepts span cstddef diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv --- a/libcxx/test/libcxx/transitive_includes/cxx20.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv @@ -128,6 +128,8 @@ chrono vector chrono version cinttypes cstdint +cmath cstddef +cmath limits cmath type_traits cmath version codecvt atomic @@ -214,13 +216,11 @@ exception cstdlib exception type_traits exception version -execution version expected cstddef expected cstdlib expected exception expected initializer_list expected new -expected version experimental/algorithm algorithm experimental/algorithm cstddef experimental/algorithm type_traits @@ -373,7 +373,6 @@ format tuple format type_traits format vector -format version forward_list algorithm forward_list atomic forward_list compare @@ -579,7 +578,6 @@ memory_resource new memory_resource stdexcept memory_resource tuple -memory_resource version mutex atomic mutex concepts mutex cstddef @@ -692,7 +690,6 @@ ranges tuple ranges type_traits ranges variant -ranges version ratio climits ratio cstdint ratio type_traits @@ -766,7 +763,6 @@ shared_mutex type_traits shared_mutex version source_location cstdint -source_location version span array span concepts span cstddef diff --git a/libcxx/test/libcxx/transitive_includes/cxx2b.csv b/libcxx/test/libcxx/transitive_includes/cxx2b.csv --- a/libcxx/test/libcxx/transitive_includes/cxx2b.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx2b.csv @@ -9,7 +9,6 @@ algorithm limits algorithm new algorithm type_traits -algorithm version any cstddef any cstdint any cstdlib @@ -20,7 +19,6 @@ any stdexcept any type_traits any typeinfo -any version array compare array cstddef array cstdlib @@ -28,7 +26,6 @@ array limits array stdexcept array type_traits -array version atomic cstddef atomic cstdint atomic cstring @@ -36,7 +33,6 @@ atomic iosfwd atomic limits atomic ratio -atomic version barrier atomic barrier cstddef barrier cstdint @@ -49,7 +45,6 @@ bit cstdint bit cstdlib bit limits -bit version bitset climits bitset cstddef bitset cstdint @@ -62,7 +57,6 @@ bitset stdexcept bitset string bitset type_traits -bitset version ccomplex complex charconv cerrno charconv cmath @@ -96,29 +90,25 @@ chrono tuple chrono type_traits chrono vector -chrono version cinttypes cstdint -cmath version +cmath cstddef +cmath limits codecvt cctype codecvt cstddef codecvt cstdint codecvt cstring codecvt mutex codecvt string -codecvt version compare cmath compare cstddef compare cstdint compare limits -compare version complex cmath complex iosfwd complex sstream complex stdexcept complex type_traits -complex version concepts cstddef -concepts version condition_variable atomic condition_variable cstddef condition_variable cstdint @@ -132,14 +122,11 @@ condition_variable stdexcept condition_variable system_error condition_variable typeinfo -condition_variable version coroutine compare coroutine cstddef coroutine cstdint coroutine cstring coroutine limits -coroutine version -cstddef version ctgmath ccomplex ctgmath cmath cwchar cwctype @@ -155,17 +142,13 @@ deque stdexcept deque tuple deque type_traits -deque version exception cstddef exception cstdlib -exception version -execution version expected cstddef expected cstdlib expected exception expected initializer_list expected new -expected version experimental/algorithm algorithm experimental/algorithm cstddef experimental/algorithm type_traits @@ -260,7 +243,6 @@ filesystem string_view filesystem system_error filesystem type_traits -filesystem version format array format bit format charconv @@ -280,7 +262,6 @@ format tuple format type_traits format vector -format version forward_list compare forward_list cstddef forward_list cstdint @@ -292,7 +273,6 @@ forward_list stdexcept forward_list tuple forward_list type_traits -forward_list version fstream cctype fstream cstddef fstream cstdint @@ -306,7 +286,6 @@ fstream ostream fstream string fstream typeinfo -fstream version functional array functional atomic functional cstddef @@ -325,7 +304,6 @@ functional typeinfo functional unordered_map functional vector -functional version future cstddef future exception future limits @@ -334,10 +312,8 @@ future ratio future system_error future thread -future version initializer_list cstddef iomanip istream -iomanip version ios atomic ios cctype ios cstddef @@ -347,17 +323,13 @@ ios mutex ios string ios system_error -ios version -iosfwd version iostream ios iostream istream iostream ostream iostream streambuf -iostream version istream cstddef istream iosfwd istream ostream -istream version iterator compare iterator concepts iterator cstddef @@ -366,11 +338,8 @@ iterator iosfwd iterator limits iterator variant -iterator version latch atomic latch limits -latch version -limits version list compare list cstddef list cstdint @@ -382,7 +351,6 @@ list stdexcept list tuple list type_traits -list version locale cctype locale cstddef locale cstdint @@ -398,7 +366,6 @@ locale new locale streambuf locale string -locale version map compare map cstddef map cstdlib @@ -409,7 +376,6 @@ map stdexcept map tuple map type_traits -map version memory atomic memory compare memory cstddef @@ -423,7 +389,6 @@ memory stdexcept memory tuple memory typeinfo -memory version memory_resource cstddef memory_resource cstdint memory_resource limits @@ -431,7 +396,6 @@ memory_resource new memory_resource stdexcept memory_resource tuple -memory_resource version mutex atomic mutex cstddef mutex cstdint @@ -446,16 +410,12 @@ mutex system_error mutex tuple mutex typeinfo -mutex version new cstddef new cstdlib new exception -new version -numbers version numeric cmath numeric cstddef numeric limits -numeric version optional compare optional cstddef optional cstdint @@ -465,7 +425,6 @@ optional new optional stdexcept optional type_traits -optional version ostream atomic ostream bitset ostream cstddef @@ -481,7 +440,6 @@ ostream stdexcept ostream streambuf ostream typeinfo -ostream version queue compare queue cstddef queue cstdlib @@ -490,7 +448,6 @@ queue limits queue type_traits queue vector -queue version random bit random cmath random cstddef @@ -503,7 +460,6 @@ random string random type_traits random vector -random version ranges compare ranges cstddef ranges cstdlib @@ -517,10 +473,8 @@ ranges tuple ranges type_traits ranges variant -ranges version ratio climits ratio cstdint -ratio version regex cctype regex compare regex cstddef @@ -535,19 +489,16 @@ regex string regex type_traits regex vector -regex version scoped_allocator cstddef scoped_allocator limits scoped_allocator new scoped_allocator tuple -scoped_allocator version semaphore atomic semaphore cstddef semaphore ctime semaphore iosfwd semaphore limits semaphore ratio -semaphore version set compare set cstddef set cstdlib @@ -558,40 +509,33 @@ set stdexcept set tuple set type_traits -set version shared_mutex cstddef shared_mutex ctime shared_mutex iosfwd shared_mutex limits shared_mutex ratio shared_mutex system_error -shared_mutex version source_location cstdint -source_location version span array span cstddef span initializer_list span limits span type_traits -span version sstream cstddef sstream istream sstream ostream sstream string -sstream version stack compare stack cstddef stack deque stack initializer_list stack type_traits -stack version stdexcept cstdlib stdexcept exception stdexcept iosfwd streambuf cstdint streambuf ios streambuf iosfwd -streambuf version string climits string compare string cstddef @@ -608,7 +552,6 @@ string string_view string tuple string type_traits -string version string_view compare string_view cstddef string_view cstdint @@ -621,10 +564,8 @@ string_view limits string_view stdexcept string_view type_traits -string_view version strstream istream strstream ostream -strstream version system_error cerrno system_error compare system_error cstddef @@ -634,7 +575,6 @@ system_error stdexcept system_error string system_error type_traits -system_error version thread compare thread cstddef thread cstdint @@ -647,16 +587,12 @@ thread system_error thread tuple thread type_traits -thread version tuple compare tuple cstddef -tuple version type_traits cstddef type_traits cstdint -type_traits version typeindex compare typeindex typeinfo -typeindex version typeinfo cstddef typeinfo cstdint typeinfo cstdlib @@ -675,7 +611,6 @@ unordered_map stdexcept unordered_map tuple unordered_map type_traits -unordered_map version unordered_set cmath unordered_set compare unordered_set cstddef @@ -689,12 +624,10 @@ unordered_set stdexcept unordered_set tuple unordered_set type_traits -unordered_set version utility compare utility cstddef utility initializer_list utility limits -utility version valarray cmath valarray cstddef valarray cstdlib @@ -703,7 +636,6 @@ valarray new valarray stdexcept valarray type_traits -valarray version variant compare variant cstddef variant cstdint @@ -713,7 +645,6 @@ variant limits variant new variant tuple -variant version vector climits vector compare vector cstddef @@ -727,4 +658,3 @@ vector stdexcept vector tuple vector type_traits -vector version diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.compile.pass.cpp @@ -19,7 +19,6 @@ __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 @@ -39,10 +38,6 @@ # 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 @@ -57,10 +52,6 @@ # 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 @@ -81,10 +72,6 @@ # 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 @@ -108,10 +95,6 @@ # 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 @@ -135,18 +118,5 @@ # 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 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.compile.pass.cpp @@ -21,7 +21,6 @@ __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 @@ -49,10 +48,6 @@ # 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 @@ -75,10 +70,6 @@ # 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 @@ -110,10 +101,6 @@ # 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 @@ -151,10 +138,6 @@ # 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 @@ -192,18 +175,5 @@ # 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 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.compile.pass.cpp @@ -21,7 +21,6 @@ __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 @@ -49,10 +48,6 @@ # 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 @@ -75,10 +70,6 @@ # 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 @@ -110,10 +101,6 @@ # 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 @@ -151,10 +138,6 @@ # 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 @@ -192,18 +175,5 @@ # 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 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.compile.pass.cpp @@ -23,7 +23,6 @@ __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 @@ -59,10 +58,6 @@ # 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 @@ -96,10 +91,6 @@ # 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 @@ -145,10 +136,6 @@ # 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 @@ -197,10 +184,6 @@ # 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 @@ -258,18 +241,5 @@ # 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 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.compile.pass.cpp @@ -17,7 +17,6 @@ /* Constant Value __cpp_lib_adaptor_iterator_pair_constructor 202106L [C++2b] - __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -29,40 +28,24 @@ # 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 @@ -72,18 +55,5 @@ # 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 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp @@ -15,13 +15,14 @@ // Test the feature test macros defined by -/* Constant Value - __cpp_lib_ranges 202106L [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] +/* Constant Value + __cpp_lib_ranges 202106L [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_to_container 202202L [C++2b] + __cpp_lib_ranges_zip 202110L [C++2b] */ #include @@ -49,6 +50,10 @@ # error "__cpp_lib_ranges_slide 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 @@ -75,6 +80,10 @@ # error "__cpp_lib_ranges_slide 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 @@ -101,6 +110,10 @@ # error "__cpp_lib_ranges_slide 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 @@ -130,6 +143,10 @@ # error "__cpp_lib_ranges_slide 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 @@ -195,6 +212,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" diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.compile.pass.cpp @@ -22,7 +22,6 @@ __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 @@ -54,10 +53,6 @@ # 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 @@ -87,10 +82,6 @@ # 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 @@ -129,10 +120,6 @@ # 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 @@ -174,10 +161,6 @@ # 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 @@ -228,18 +211,5 @@ # 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 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.compile.pass.cpp @@ -17,7 +17,6 @@ /* Constant Value __cpp_lib_adaptor_iterator_pair_constructor 202106L [C++2b] - __cpp_lib_ranges_to_container 202202L [C++2b] */ #include @@ -29,40 +28,24 @@ # 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 @@ -72,18 +55,5 @@ # 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 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.compile.pass.cpp @@ -21,7 +21,6 @@ __cpp_lib_constexpr_string 201907L [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] @@ -55,10 +54,6 @@ # 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 @@ -101,10 +96,6 @@ # 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 @@ -156,10 +147,6 @@ # 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 @@ -229,10 +216,6 @@ # 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 @@ -305,19 +288,6 @@ # 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/unordered_map.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.compile.pass.cpp @@ -22,7 +22,6 @@ __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] */ @@ -55,10 +54,6 @@ # 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 @@ -89,10 +84,6 @@ # 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 @@ -132,10 +123,6 @@ # 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 @@ -184,10 +171,6 @@ # 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 @@ -245,19 +228,6 @@ # 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.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.compile.pass.cpp @@ -22,7 +22,6 @@ __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 @@ -54,10 +53,6 @@ # 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 @@ -84,10 +79,6 @@ # 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 @@ -123,10 +114,6 @@ # 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 @@ -168,10 +155,6 @@ # 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 @@ -222,18 +205,5 @@ # 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 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.compile.pass.cpp @@ -21,7 +21,6 @@ __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 @@ -49,10 +48,6 @@ # 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 @@ -75,10 +70,6 @@ # 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 @@ -110,10 +101,6 @@ # 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 @@ -151,10 +138,6 @@ # 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 @@ -192,18 +175,5 @@ # 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 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 @@ -569,7 +569,7 @@ }, { "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"], + "headers": ["ranges"], "unimplemented": True, }, { "name": "__cpp_lib_ranges_zip", @@ -850,45 +850,6 @@ Functions to produce the header """ -def produce_macros_definition_for_std(std): - result = "" - indent = 55 - for tc in feature_test_macros: - if std not in tc["values"]: - continue - inner_indent = 1 - if 'test_suite_guard' in tc.keys(): - result += "# if %s\n" % tc["libcxx_guard"] - inner_indent += 2 - if get_value_before(tc["values"], std) is not None: - assert 'test_suite_guard' not in tc.keys() - result += "# undef %s\n" % tc["name"] - line = "#%sdefine %s" % ((" " * inner_indent), tc["name"]) - line += " " * (indent - len(line)) - line += " %sL" % tc["values"][std] - if 'unimplemented' in tc.keys(): - line = "// " + line - result += line - result += "\n" - if 'test_suite_guard' in tc.keys(): - result += "# endif\n" - return result.strip() - -def produce_macros_definitions(): - macro_definition_template = """#if _LIBCPP_STD_VER > {previous_std_number} -{macro_definition} -#endif""" - - macros_definitions = [] - previous_std_number = '11' - for std in get_std_dialects(): - macros_definitions.append( - macro_definition_template.format(previous_std_number=previous_std_number, - macro_definition=produce_macros_definition_for_std(std))) - previous_std_number = get_std_number(std) - - return '\n\n'.join(macros_definitions) - def chunks(l, n): """Yield successive n-sized chunks from l.""" for i in range(0, len(l), n): @@ -927,6 +888,87 @@ prev_defined_std.replace("c++", "C++")) return result +def version_to_value(version): + if version == "c++2b": + return 23 + if version == "c++20": + return 20 + if version == "c++17": + return 17 + if version == "c++14": + return 14 + assert False, f"{version}" + +def generate_macro_string(version, macros): + if len(macros) == 0: + return "" + + macro_list = "" + + for macro in macros: + if macro["guard"] == "": + macro_list += "\n# undef {name}\n# define {name} {version}\n".format( + name = macro["name"], + version = macro["value"], + ) + else: + macro_list += "\n# if {guard}\n# undef {name}\n# define {name} {version}\n# endif\n".format( + guard = macro["guard"], + name = macro["name"], + version = macro["value"], + ) + + macro_str = "#if _LIBCPP_STD_VER >= {version}{macros}#endif // _LIBCPP_STD_VER >= {version}\n\n".format( + version = version_to_value(version), + macros = macro_list, + ) + return macro_str + +def update_header(header): + feature_test_macro_by_version = {"c++14": [], "c++17": [], "c++20": [], "c++2b": []} + for macro in feature_test_macros: + if header not in macro["headers"] or ( + "unimplemented" in macro.keys() and macro["unimplemented"]): + continue + for (version, ftm_value) in macro["values"].items(): + feature_test_macro_by_version[version].append({ + "name": macro["name"], + "value": ftm_value, + "guard": macro["libcxx_guard"] if "libcxx_guard" in macro.keys() else "" + }) + + macro_str = "\n" + for (version, macros) in feature_test_macro_by_version.items(): + macro_str += generate_macro_string(version, macros) + + header_path = os.path.join(include_path, header) + with open(header_path, 'r', newline='\n') as file: + content = file.read() + + assert "\n// ftm_list_begin\n" in content and "\n// ftm_list_end\n" in content, f"<{header}> seems to be missing a ftm_list area" + + before_list, after_list_begin = content.split("// ftm_list_begin", 1) + _, after_list = after_list_begin.split("// ftm_list_end") + + with open(header_path, 'w', newline='\n') as file: + file.write(before_list) + file.write("// ftm_list_begin\n") + file.write(macro_str) + file.write("// ftm_list_end") + file.write(after_list) + +def generate_per_header_version_macros(): + headers = set() + for macro in feature_test_macros: + if "unimplemented" in macro.keys() and macro["unimplemented"]: + continue + for header in macro["headers"]: + headers.add(header) + headers = sorted(headers) + + for header in headers: + update_header(header) + def produce_version_header(): template="""// -*- C++ -*- @@ -955,18 +997,15 @@ # pragma GCC system_header #endif -// clang-format off - -{cxx_macros} +// This part of the file is generated by generate_feature_test_macro_components.py. Do not edit it manually. +// ftm_list_begin -// clang-format on +// ftm_list_end #endif // _LIBCPP_VERSIONH """ - version_str = template.format( - synopsis=produce_version_synopsis().strip(), - cxx_macros=produce_macros_definitions()) + version_str = template.format(synopsis=produce_version_synopsis().strip()) version_header_path = os.path.join(include_path, 'version') with open(version_header_path, 'w', newline='\n') as f: f.write(version_str) @@ -1216,6 +1255,7 @@ def main(): produce_version_header() + generate_per_header_version_macros() produce_tests() produce_docs()