From e3e6ae6464048e35067e344d249363781fcda18a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 18 Jul 2024 10:59:58 +0200 Subject: [PATCH] [libc++] Include the rest of the detail headers by version in the umbrella headers (#96032) This is a follow-up to #83740. --- libcxx/include/__type_traits/make_signed.h | 1 + libcxx/include/atomic | 5 +- libcxx/include/expected | 18 +++- libcxx/include/filesystem | 36 +++---- libcxx/include/format | 81 ++++++++++------ libcxx/include/forward_list | 1 + libcxx/include/functional | 47 ++++++--- libcxx/include/iterator | 56 ++++++----- libcxx/include/mdspan | 27 ++++-- libcxx/include/memory | 28 ++++-- libcxx/include/memory_resource | 26 +++-- libcxx/include/module.modulemap | 16 +++- libcxx/include/numeric | 29 ++++-- libcxx/include/ostream | 9 +- libcxx/include/random | 3 - libcxx/include/ranges | 95 +++++++++++-------- libcxx/include/stop_token | 9 +- libcxx/include/string_view | 1 + libcxx/include/type_traits | 63 ++++++------ libcxx/include/utility | 38 +++++--- .../sequences/deque/abi.compile.pass.cpp | 1 + .../sequences/list/abi.compile.pass.cpp | 1 + .../bounded_iter/arithmetic.pass.cpp | 2 +- .../bounded_iter/comparison.pass.cpp | 2 +- .../bounded_iter/dereference.pass.cpp | 2 +- .../bounded_iter/pointer_traits.pass.cpp | 3 +- .../bounded_iter/types.compile.pass.cpp | 1 + .../libcxx/memory/allocation_guard.pass.cpp | 2 +- .../compressed_pair/compressed_pair.pass.cpp | 2 +- .../numerics/clamp_to_integral.pass.cpp | 2 +- .../as-lvalue.lifetimebound.verify.cpp | 2 +- .../range.adaptor.helpers/as-lvalue.pass.cpp | 1 + .../test/libcxx/transitive_includes/cxx03.csv | 1 + .../test/libcxx/transitive_includes/cxx11.csv | 1 + .../test/libcxx/transitive_includes/cxx14.csv | 1 + .../test/libcxx/transitive_includes/cxx17.csv | 1 + .../test/libcxx/transitive_includes/cxx20.csv | 2 + .../test/libcxx/transitive_includes/cxx23.csv | 1 - .../test/libcxx/transitive_includes/cxx26.csv | 1 - .../type_traits/is_callable.compile.pass.cpp | 2 +- .../is_constant_evaluated.pass.cpp | 2 +- ..._implicitly_default_constructible.pass.cpp | 3 +- .../is_specialization.compile.pass.cpp | 5 +- .../type_traits/is_specialization.verify.cpp | 3 +- .../type_traits/lazy_metafunctions.pass.cpp | 3 + .../exception_guard.no_exceptions.pass.cpp | 1 + .../libcxx/utilities/exception_guard.pass.cpp | 1 + .../func.bind.partial/compose.pass.cpp | 2 +- .../libcxx/utilities/meta/meta_base.pass.cpp | 5 +- .../make.heap/ranges_make_heap.pass.cpp | 1 + .../pop.heap/ranges_pop_heap.pass.cpp | 1 + .../push.heap/ranges_push_heap.pass.cpp | 1 + .../range.owning.view/begin_end.pass.cpp | 1 + .../iterator/plus_eq.pass.cpp | 3 +- libcxx/test/support/test_iterators.h | 1 + 55 files changed, 417 insertions(+), 236 deletions(-) diff --git a/libcxx/include/__type_traits/make_signed.h b/libcxx/include/__type_traits/make_signed.h index c1fc009d9ba2e1c..d09d6ed4a1e7cc7 100644 --- a/libcxx/include/__type_traits/make_signed.h +++ b/libcxx/include/__type_traits/make_signed.h @@ -10,6 +10,7 @@ #define _LIBCPP___TYPE_TRAITS_MAKE_SIGNED_H #include <__config> +#include <__type_traits/copy_cv.h> #include <__type_traits/is_enum.h> #include <__type_traits/is_integral.h> #include <__type_traits/nat.h> diff --git a/libcxx/include/atomic b/libcxx/include/atomic index 80a0f9ee373e9ff..0d13619d6ce458f 100644 --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -599,7 +599,6 @@ template #include <__atomic/atomic_flag.h> #include <__atomic/atomic_init.h> #include <__atomic/atomic_lock_free.h> -#include <__atomic/atomic_ref.h> #include <__atomic/atomic_sync.h> #include <__atomic/check_memory_order.h> #include <__atomic/contention_t.h> @@ -610,6 +609,10 @@ template #include <__atomic/memory_order.h> #include +#if _LIBCPP_STD_VER >= 20 +# include <__atomic/atomic_ref.h> +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/expected b/libcxx/include/expected index f455ab7d5d61c6d..6a2f12f2bf3b5d4 100644 --- a/libcxx/include/expected +++ b/libcxx/include/expected @@ -39,14 +39,24 @@ namespace std { */ #include <__config> -#include <__expected/bad_expected_access.h> -#include <__expected/expected.h> -#include <__expected/unexpect.h> -#include <__expected/unexpected.h> + +#if _LIBCPP_STD_VER >= 23 +# include <__expected/bad_expected_access.h> +# include <__expected/expected.h> +# include <__expected/unexpect.h> +# include <__expected/unexpected.h> +#endif + #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 +# include +# include +#endif + #endif // _LIBCPP_EXPECTED diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem index eff7dff4a455129..6ea04df0a089b0a 100644 --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -534,22 +534,26 @@ inline constexpr bool std::ranges::enable_view -#include <__filesystem/copy_options.h> -#include <__filesystem/directory_entry.h> -#include <__filesystem/directory_iterator.h> -#include <__filesystem/directory_options.h> -#include <__filesystem/file_status.h> -#include <__filesystem/file_time_type.h> -#include <__filesystem/file_type.h> -#include <__filesystem/filesystem_error.h> -#include <__filesystem/operations.h> -#include <__filesystem/path.h> -#include <__filesystem/path_iterator.h> -#include <__filesystem/perm_options.h> -#include <__filesystem/perms.h> -#include <__filesystem/recursive_directory_iterator.h> -#include <__filesystem/space_info.h> -#include <__filesystem/u8path.h> + +#if _LIBCPP_STD_VER >= 17 +# include <__filesystem/copy_options.h> +# include <__filesystem/directory_entry.h> +# include <__filesystem/directory_iterator.h> +# include <__filesystem/directory_options.h> +# include <__filesystem/file_status.h> +# include <__filesystem/file_time_type.h> +# include <__filesystem/file_type.h> +# include <__filesystem/filesystem_error.h> +# include <__filesystem/operations.h> +# include <__filesystem/path.h> +# include <__filesystem/path_iterator.h> +# include <__filesystem/perm_options.h> +# include <__filesystem/perms.h> +# include <__filesystem/recursive_directory_iterator.h> +# include <__filesystem/space_info.h> +# include <__filesystem/u8path.h> +#endif + #include // standard-mandated includes diff --git a/libcxx/include/format b/libcxx/include/format index 07c2ba083199e91..c3f2b45f0f73054 100644 --- a/libcxx/include/format +++ b/libcxx/include/format @@ -189,40 +189,65 @@ namespace std { */ #include <__config> -#include <__format/buffer.h> -#include <__format/concepts.h> -#include <__format/container_adaptor.h> -#include <__format/enable_insertable.h> -#include <__format/escaped_output_table.h> -#include <__format/extended_grapheme_cluster_table.h> -#include <__format/format_arg.h> -#include <__format/format_arg_store.h> -#include <__format/format_args.h> -#include <__format/format_context.h> -#include <__format/format_error.h> -#include <__format/format_functions.h> -#include <__format/format_parse_context.h> -#include <__format/format_string.h> -#include <__format/format_to_n_result.h> -#include <__format/formatter.h> -#include <__format/formatter_bool.h> -#include <__format/formatter_char.h> -#include <__format/formatter_floating_point.h> -#include <__format/formatter_integer.h> -#include <__format/formatter_pointer.h> -#include <__format/formatter_string.h> -#include <__format/formatter_tuple.h> -#include <__format/parser_std_format_spec.h> -#include <__format/range_default_formatter.h> -#include <__format/range_formatter.h> -#include <__format/unicode.h> -#include <__fwd/format.h> + +#if _LIBCPP_STD_VER >= 20 +# include <__format/buffer.h> +# include <__format/concepts.h> +# include <__format/container_adaptor.h> +# include <__format/enable_insertable.h> +# include <__format/escaped_output_table.h> +# include <__format/extended_grapheme_cluster_table.h> +# include <__format/format_arg.h> +# include <__format/format_arg_store.h> +# include <__format/format_args.h> +# include <__format/format_context.h> +# include <__format/format_error.h> +# include <__format/format_functions.h> +# include <__format/format_parse_context.h> +# include <__format/format_string.h> +# include <__format/format_to_n_result.h> +# include <__format/formatter.h> +# include <__format/formatter_bool.h> +# include <__format/formatter_char.h> +# include <__format/formatter_floating_point.h> +# include <__format/formatter_integer.h> +# include <__format/formatter_pointer.h> +# include <__format/formatter_string.h> +# include <__format/formatter_tuple.h> +# include <__format/parser_std_format_spec.h> +# include <__format/range_default_formatter.h> +# include <__format/range_formatter.h> +# include <__format/unicode.h> +# include <__fwd/format.h> +#endif + #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 +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif + #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list index 1ae19d23f88cc8e..b14d2cb6c78036f 100644 --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -224,6 +224,7 @@ template #include <__type_traits/is_nothrow_constructible.h> #include <__type_traits/is_pointer.h> #include <__type_traits/is_same.h> +#include <__type_traits/is_swappable.h> #include <__type_traits/type_identity.h> #include <__utility/forward.h> #include <__utility/move.h> diff --git a/libcxx/include/functional b/libcxx/include/functional index 27cf21e1a4c8bd5..3d39f654ddb08a2 100644 --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -527,41 +527,60 @@ POLICY: For non-variadic implementations, the number of arguments is limited */ -#include <__algorithm/search.h> -#include <__compare/compare_three_way.h> #include <__config> + #include <__functional/binary_function.h> #include <__functional/binary_negate.h> #include <__functional/bind.h> -#include <__functional/bind_back.h> -#include <__functional/bind_front.h> #include <__functional/binder1st.h> #include <__functional/binder2nd.h> -#include <__functional/boyer_moore_searcher.h> -#include <__functional/compose.h> -#include <__functional/default_searcher.h> -#include <__functional/function.h> #include <__functional/hash.h> -#include <__functional/identity.h> -#include <__functional/invoke.h> #include <__functional/mem_fn.h> // TODO: deprecate #include <__functional/mem_fun_ref.h> -#include <__functional/not_fn.h> #include <__functional/operations.h> #include <__functional/pointer_to_binary_function.h> #include <__functional/pointer_to_unary_function.h> -#include <__functional/ranges_operations.h> #include <__functional/reference_wrapper.h> #include <__functional/unary_function.h> #include <__functional/unary_negate.h> -#include <__type_traits/unwrap_ref.h> -#include <__utility/forward.h> + +#ifndef _LIBCPP_CXX03_LANG +# include <__functional/function.h> +#endif + +#if _LIBCPP_STD_VER >= 17 +# include <__functional/boyer_moore_searcher.h> +# include <__functional/default_searcher.h> +# include <__functional/invoke.h> +# include <__functional/not_fn.h> +#endif + +#if _LIBCPP_STD_VER >= 20 +# include <__functional/bind_back.h> +# include <__functional/bind_front.h> +# include <__functional/identity.h> +# include <__functional/ranges_operations.h> +# include <__type_traits/unwrap_ref.h> +#endif + #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && defined(_LIBCPP_CXX03_LANG) +# include +# include +#endif + +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 14 +# include +# include +# include +# include +#endif + #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include diff --git a/libcxx/include/iterator b/libcxx/include/iterator index 1b9e7eaf0c1e8ca..fca75f0a19ed1b9 100644 --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -683,43 +683,49 @@ template constexpr const E* data(initializer_list il) noexcept; #include <__iterator/access.h> #include <__iterator/advance.h> #include <__iterator/back_insert_iterator.h> -#include <__iterator/bounded_iter.h> -#include <__iterator/common_iterator.h> -#include <__iterator/concepts.h> -#include <__iterator/counted_iterator.h> -#include <__iterator/data.h> -#include <__iterator/default_sentinel.h> #include <__iterator/distance.h> -#include <__iterator/empty.h> -#include <__iterator/erase_if_container.h> #include <__iterator/front_insert_iterator.h> -#include <__iterator/incrementable_traits.h> -#include <__iterator/indirectly_comparable.h> #include <__iterator/insert_iterator.h> #include <__iterator/istream_iterator.h> #include <__iterator/istreambuf_iterator.h> -#include <__iterator/iter_move.h> -#include <__iterator/iter_swap.h> #include <__iterator/iterator.h> #include <__iterator/iterator_traits.h> -#include <__iterator/mergeable.h> #include <__iterator/move_iterator.h> -#include <__iterator/move_sentinel.h> #include <__iterator/next.h> #include <__iterator/ostream_iterator.h> #include <__iterator/ostreambuf_iterator.h> -#include <__iterator/permutable.h> #include <__iterator/prev.h> -#include <__iterator/projected.h> -#include <__iterator/readable_traits.h> -#include <__iterator/reverse_access.h> #include <__iterator/reverse_iterator.h> -#include <__iterator/size.h> -#include <__iterator/sortable.h> -#include <__iterator/unreachable_sentinel.h> #include <__iterator/wrap_iter.h> -#include <__memory/addressof.h> -#include <__memory/pointer_traits.h> + +#if _LIBCPP_STD_VER >= 14 +# include <__iterator/reverse_access.h> +#endif + +#if _LIBCPP_STD_VER >= 17 +# include <__iterator/data.h> +# include <__iterator/empty.h> +# include <__iterator/size.h> +#endif + +#if _LIBCPP_STD_VER >= 20 +# include <__iterator/common_iterator.h> +# include <__iterator/concepts.h> +# include <__iterator/counted_iterator.h> +# include <__iterator/default_sentinel.h> +# include <__iterator/incrementable_traits.h> +# include <__iterator/indirectly_comparable.h> +# include <__iterator/iter_move.h> +# include <__iterator/iter_swap.h> +# include <__iterator/mergeable.h> +# include <__iterator/move_sentinel.h> +# include <__iterator/permutable.h> +# include <__iterator/projected.h> +# include <__iterator/readable_traits.h> +# include <__iterator/sortable.h> +# include <__iterator/unreachable_sentinel.h> +#endif + #include // standard-mandated includes @@ -732,6 +738,10 @@ template constexpr const E* data(initializer_list il) noexcept; # pragma GCC system_header #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17 +# include +#endif + #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include diff --git a/libcxx/include/mdspan b/libcxx/include/mdspan index aa7ba278b1aa06b..29190e4a9953ed0 100644 --- a/libcxx/include/mdspan +++ b/libcxx/include/mdspan @@ -409,17 +409,30 @@ namespace std { #define _LIBCPP_MDSPAN #include <__config> -#include <__fwd/mdspan.h> -#include <__mdspan/default_accessor.h> -#include <__mdspan/extents.h> -#include <__mdspan/layout_left.h> -#include <__mdspan/layout_right.h> -#include <__mdspan/layout_stride.h> -#include <__mdspan/mdspan.h> + +#if _LIBCPP_STD_VER >= 23 +# include <__fwd/mdspan.h> +# include <__mdspan/default_accessor.h> +# include <__mdspan/extents.h> +# include <__mdspan/layout_left.h> +# include <__mdspan/layout_right.h> +# include <__mdspan/layout_stride.h> +# include <__mdspan/mdspan.h> +#endif + #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 +# include +# include +# include +# include +# include +#endif + #endif // _LIBCPP_MDSPAN diff --git a/libcxx/include/memory b/libcxx/include/memory index a8c0264eb9eb78b..d52ee7b4c8eee70 100644 --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -920,30 +920,38 @@ template #include <__config> #include <__memory/addressof.h> #include <__memory/align.h> -#include <__memory/allocate_at_least.h> -#include <__memory/allocation_guard.h> #include <__memory/allocator.h> #include <__memory/allocator_arg_t.h> #include <__memory/allocator_traits.h> -#include <__memory/assume_aligned.h> #include <__memory/auto_ptr.h> -#include <__memory/compressed_pair.h> -#include <__memory/concepts.h> -#include <__memory/construct_at.h> #include <__memory/pointer_traits.h> -#include <__memory/ranges_construct_at.h> -#include <__memory/ranges_uninitialized_algorithms.h> #include <__memory/raw_storage_iterator.h> #include <__memory/shared_ptr.h> #include <__memory/temporary_buffer.h> #include <__memory/uninitialized_algorithms.h> #include <__memory/unique_ptr.h> #include <__memory/uses_allocator.h> -#include <__memory/uses_allocator_construction.h> -#include // standard-mandated includes +#if _LIBCPP_STD_VER >= 17 +# include <__memory/construct_at.h> +#endif + +#if _LIBCPP_STD_VER >= 20 +# include <__memory/assume_aligned.h> +# include <__memory/concepts.h> +# include <__memory/ranges_construct_at.h> +# include <__memory/ranges_uninitialized_algorithms.h> +# include <__memory/uses_allocator_construction.h> +#endif + +#if _LIBCPP_STD_VER >= 23 +# include <__memory/allocate_at_least.h> +#endif + +#include + // [memory.syn] #include diff --git a/libcxx/include/memory_resource b/libcxx/include/memory_resource index e9c87777e8f750f..67411054820a1a4 100644 --- a/libcxx/include/memory_resource +++ b/libcxx/include/memory_resource @@ -50,18 +50,32 @@ namespace std::pmr { */ #include <__config> -#include <__memory_resource/memory_resource.h> -#include <__memory_resource/monotonic_buffer_resource.h> -#include <__memory_resource/polymorphic_allocator.h> -#include <__memory_resource/pool_options.h> -#include <__memory_resource/synchronized_pool_resource.h> -#include <__memory_resource/unsynchronized_pool_resource.h> + +#if _LIBCPP_STD_VER >= 17 +# include <__memory_resource/memory_resource.h> +# include <__memory_resource/monotonic_buffer_resource.h> +# include <__memory_resource/polymorphic_allocator.h> +# include <__memory_resource/pool_options.h> +# include <__memory_resource/synchronized_pool_resource.h> +# include <__memory_resource/unsynchronized_pool_resource.h> +#endif + #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 14 +# include +# include +# include +# include +# include +# include +# include +#endif + #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include #endif diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap index f4aaa14c1c2ee6f..7608aef3f3a439e 100644 --- a/libcxx/include/module.modulemap +++ b/libcxx/include/module.modulemap @@ -1081,7 +1081,10 @@ module std_private_charconv_tables [system] { header "__charcon module std_private_charconv_to_chars [system] { header "__charconv/to_chars.h" } module std_private_charconv_to_chars_base_10 [system] { header "__charconv/to_chars_base_10.h" } module std_private_charconv_to_chars_floating_point [system] { header "__charconv/to_chars_floating_point.h" } -module std_private_charconv_to_chars_integral [system] { header "__charconv/to_chars_integral.h" } +module std_private_charconv_to_chars_integral [system] { + header "__charconv/to_chars_integral.h" + export std_private_charconv_traits +} module std_private_charconv_to_chars_result [system] { header "__charconv/to_chars_result.h" export * @@ -1130,6 +1133,7 @@ module std_private_chrono_steady_clock [system] { } module std_private_chrono_time_zone [system] { header "__chrono/time_zone.h" + export std_private_memory_unique_ptr } module std_private_chrono_time_zone_link [system] { header "__chrono/time_zone_link.h" @@ -1924,7 +1928,10 @@ module std_private_type_traits_is_array [system module std_private_type_traits_is_assignable [system] { header "__type_traits/is_assignable.h" } module std_private_type_traits_is_base_of [system] { header "__type_traits/is_base_of.h" } module std_private_type_traits_is_bounded_array [system] { header "__type_traits/is_bounded_array.h" } -module std_private_type_traits_is_callable [system] { header "__type_traits/is_callable.h" } +module std_private_type_traits_is_callable [system] { + header "__type_traits/is_callable.h" + export std_private_type_traits_integral_constant +} module std_private_type_traits_is_char_like_type [system] { header "__type_traits/is_char_like_type.h" } module std_private_type_traits_is_class [system] { header "__type_traits/is_class.h" } module std_private_type_traits_is_compound [system] { header "__type_traits/is_compound.h" } @@ -1959,7 +1966,10 @@ module std_private_type_traits_is_final [system module std_private_type_traits_is_floating_point [system] { header "__type_traits/is_floating_point.h" } module std_private_type_traits_is_function [system] { header "__type_traits/is_function.h" } module std_private_type_traits_is_fundamental [system] { header "__type_traits/is_fundamental.h" } -module std_private_type_traits_is_implicitly_default_constructible [system] { header "__type_traits/is_implicitly_default_constructible.h" } +module std_private_type_traits_is_implicitly_default_constructible [system] { + header "__type_traits/is_implicitly_default_constructible.h" + export std_private_type_traits_integral_constant +} module std_private_type_traits_is_integral [system] { header "__type_traits/is_integral.h" } module std_private_type_traits_is_literal_type [system] { header "__type_traits/is_literal_type.h" } module std_private_type_traits_is_member_pointer [system] { header "__type_traits/is_member_pointer.h" } diff --git a/libcxx/include/numeric b/libcxx/include/numeric index 9fb5e9fb1da701c..6b92ce3a0712376 100644 --- a/libcxx/include/numeric +++ b/libcxx/include/numeric @@ -157,31 +157,40 @@ constexpr T saturate_cast(U x) noexcept; // freestanding, Sin */ #include <__config> -#include #include <__numeric/accumulate.h> #include <__numeric/adjacent_difference.h> -#include <__numeric/exclusive_scan.h> -#include <__numeric/gcd_lcm.h> -#include <__numeric/inclusive_scan.h> #include <__numeric/inner_product.h> #include <__numeric/iota.h> -#include <__numeric/midpoint.h> #include <__numeric/partial_sum.h> -#include <__numeric/reduce.h> -#include <__numeric/saturation_arithmetic.h> -#include <__numeric/transform_exclusive_scan.h> -#include <__numeric/transform_inclusive_scan.h> -#include <__numeric/transform_reduce.h> #if _LIBCPP_STD_VER >= 17 +# include <__numeric/exclusive_scan.h> +# include <__numeric/gcd_lcm.h> +# include <__numeric/inclusive_scan.h> # include <__numeric/pstl.h> +# include <__numeric/reduce.h> +# include <__numeric/transform_exclusive_scan.h> +# include <__numeric/transform_inclusive_scan.h> +# include <__numeric/transform_reduce.h> +#endif + +#if _LIBCPP_STD_VER >= 20 +# include <__numeric/midpoint.h> +# include <__numeric/saturation_arithmetic.h> #endif +#include + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 14 +# include +# include +#endif + #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include diff --git a/libcxx/include/ostream b/libcxx/include/ostream index f75110e7d73f799..359d3c0e19c4cfb 100644 --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -173,8 +173,13 @@ void vprint_nonunicode(ostream& os, string_view fmt, format_args args); */ #include <__config> + #include <__ostream/basic_ostream.h> -#include <__ostream/print.h> + +#if _LIBCPP_STD_VER >= 23 +# include <__ostream/print.h> +#endif + #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -186,8 +191,10 @@ void vprint_nonunicode(ostream& os, string_view fmt, format_args args); # include # include # include +# include # include # include +# include # include # include #endif diff --git a/libcxx/include/random b/libcxx/include/random index 9edd6c4608ec269..6cc3760c20e16c7 100644 --- a/libcxx/include/random +++ b/libcxx/include/random @@ -1682,7 +1682,6 @@ class piecewise_linear_distribution #include <__random/binomial_distribution.h> #include <__random/cauchy_distribution.h> #include <__random/chi_squared_distribution.h> -#include <__random/clamp_to_integral.h> #include <__random/default_random_engine.h> #include <__random/discard_block_engine.h> #include <__random/discrete_distribution.h> @@ -1694,10 +1693,8 @@ class piecewise_linear_distribution #include <__random/geometric_distribution.h> #include <__random/independent_bits_engine.h> #include <__random/is_seed_sequence.h> -#include <__random/is_valid.h> #include <__random/knuth_b.h> #include <__random/linear_congruential_engine.h> -#include <__random/log2.h> #include <__random/lognormal_distribution.h> #include <__random/mersenne_twister_engine.h> #include <__random/negative_binomial_distribution.h> diff --git a/libcxx/include/ranges b/libcxx/include/ranges index 07a525ed8641fdb..fa35874265de675 100644 --- a/libcxx/include/ranges +++ b/libcxx/include/ranges @@ -381,49 +381,56 @@ namespace std { */ #include <__config> -#include <__ranges/access.h> -#include <__ranges/all.h> -#include <__ranges/as_rvalue_view.h> -#include <__ranges/chunk_by_view.h> -#include <__ranges/common_view.h> -#include <__ranges/concepts.h> -#include <__ranges/counted.h> -#include <__ranges/dangling.h> -#include <__ranges/data.h> -#include <__ranges/drop_view.h> -#include <__ranges/drop_while_view.h> -#include <__ranges/elements_view.h> -#include <__ranges/empty.h> -#include <__ranges/empty_view.h> -#include <__ranges/enable_borrowed_range.h> -#include <__ranges/enable_view.h> -#include <__ranges/filter_view.h> -#include <__ranges/from_range.h> -#include <__ranges/iota_view.h> -#include <__ranges/join_view.h> -#include <__ranges/lazy_split_view.h> -#include <__ranges/rbegin.h> -#include <__ranges/ref_view.h> -#include <__ranges/rend.h> -#include <__ranges/repeat_view.h> -#include <__ranges/reverse_view.h> -#include <__ranges/single_view.h> -#include <__ranges/size.h> -#include <__ranges/split_view.h> -#include <__ranges/subrange.h> -#include <__ranges/take_view.h> -#include <__ranges/take_while_view.h> -#include <__ranges/to.h> -#include <__ranges/transform_view.h> -#include <__ranges/view_interface.h> -#include <__ranges/views.h> -#include <__ranges/zip_view.h> -#include -#if !defined(_LIBCPP_HAS_NO_LOCALIZATION) -# include <__ranges/istream_view.h> +#if _LIBCPP_STD_VER >= 20 +# include <__ranges/access.h> +# include <__ranges/all.h> +# include <__ranges/common_view.h> +# include <__ranges/concepts.h> +# include <__ranges/counted.h> +# include <__ranges/dangling.h> +# include <__ranges/data.h> +# include <__ranges/drop_view.h> +# include <__ranges/drop_while_view.h> +# include <__ranges/elements_view.h> +# include <__ranges/empty.h> +# include <__ranges/empty_view.h> +# include <__ranges/enable_borrowed_range.h> +# include <__ranges/enable_view.h> +# include <__ranges/filter_view.h> +# include <__ranges/iota_view.h> +# include <__ranges/join_view.h> +# include <__ranges/lazy_split_view.h> +# include <__ranges/rbegin.h> +# include <__ranges/ref_view.h> +# include <__ranges/rend.h> +# include <__ranges/reverse_view.h> +# include <__ranges/single_view.h> +# include <__ranges/size.h> +# include <__ranges/split_view.h> +# include <__ranges/subrange.h> +# include <__ranges/take_view.h> +# include <__ranges/take_while_view.h> +# include <__ranges/transform_view.h> +# include <__ranges/view_interface.h> +# include <__ranges/views.h> + +# if !defined(_LIBCPP_HAS_NO_LOCALIZATION) +# include <__ranges/istream_view.h> +# endif +#endif + +#if _LIBCPP_STD_VER >= 23 +# include <__ranges/as_rvalue_view.h> +# include <__ranges/chunk_by_view.h> +# include <__ranges/from_range.h> +# include <__ranges/repeat_view.h> +# include <__ranges/to.h> +# include <__ranges/zip_view.h> #endif +#include + // standard-mandated includes // [ranges.syn] @@ -439,6 +446,14 @@ namespace std { # pragma GCC system_header #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17 +# include +# include +# include +# include +# include +#endif + #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include diff --git a/libcxx/include/stop_token b/libcxx/include/stop_token index c9c54dfb5a755be..d4e651d9541f4ed 100644 --- a/libcxx/include/stop_token +++ b/libcxx/include/stop_token @@ -35,9 +35,12 @@ namespace std { #if !defined(_LIBCPP_HAS_NO_THREADS) -# include <__stop_token/stop_callback.h> -# include <__stop_token/stop_source.h> -# include <__stop_token/stop_token.h> +# if _LIBCPP_STD_VER >= 20 +# include <__stop_token/stop_callback.h> +# include <__stop_token/stop_source.h> +# include <__stop_token/stop_token.h> +# endif + # include # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/string_view b/libcxx/include/string_view index b2a4db4e7519adf..72dbf0bfa8e5404 100644 --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -210,6 +210,7 @@ namespace std { #include <__config> #include <__functional/hash.h> #include <__functional/unary_function.h> +#include <__fwd/ostream.h> #include <__fwd/string_view.h> #include <__iterator/bounded_iter.h> #include <__iterator/concepts.h> diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index a77ddadafb6810a..ffa137338b6a208 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -428,97 +428,96 @@ namespace std #include <__type_traits/aligned_storage.h> #include <__type_traits/aligned_union.h> #include <__type_traits/alignment_of.h> -#include <__type_traits/can_extract_key.h> -#include <__type_traits/common_reference.h> #include <__type_traits/common_type.h> #include <__type_traits/conditional.h> -#include <__type_traits/conjunction.h> #include <__type_traits/decay.h> -#include <__type_traits/dependent_type.h> -#include <__type_traits/disjunction.h> #include <__type_traits/enable_if.h> #include <__type_traits/extent.h> -#include <__type_traits/has_unique_object_representation.h> #include <__type_traits/has_virtual_destructor.h> #include <__type_traits/integral_constant.h> -#include <__type_traits/invoke.h> #include <__type_traits/is_abstract.h> -#include <__type_traits/is_aggregate.h> #include <__type_traits/is_arithmetic.h> #include <__type_traits/is_array.h> #include <__type_traits/is_assignable.h> #include <__type_traits/is_base_of.h> -#include <__type_traits/is_bounded_array.h> -#include <__type_traits/is_callable.h> -#include <__type_traits/is_char_like_type.h> #include <__type_traits/is_class.h> #include <__type_traits/is_compound.h> #include <__type_traits/is_const.h> -#include <__type_traits/is_constant_evaluated.h> #include <__type_traits/is_constructible.h> #include <__type_traits/is_convertible.h> #include <__type_traits/is_destructible.h> #include <__type_traits/is_empty.h> #include <__type_traits/is_enum.h> -#include <__type_traits/is_final.h> #include <__type_traits/is_floating_point.h> #include <__type_traits/is_function.h> #include <__type_traits/is_fundamental.h> -#include <__type_traits/is_implicitly_default_constructible.h> #include <__type_traits/is_integral.h> #include <__type_traits/is_literal_type.h> #include <__type_traits/is_member_pointer.h> #include <__type_traits/is_nothrow_assignable.h> #include <__type_traits/is_nothrow_constructible.h> -#include <__type_traits/is_nothrow_convertible.h> #include <__type_traits/is_nothrow_destructible.h> -#include <__type_traits/is_null_pointer.h> #include <__type_traits/is_object.h> #include <__type_traits/is_pod.h> #include <__type_traits/is_pointer.h> #include <__type_traits/is_polymorphic.h> #include <__type_traits/is_reference.h> -#include <__type_traits/is_reference_wrapper.h> -#include <__type_traits/is_referenceable.h> #include <__type_traits/is_same.h> #include <__type_traits/is_scalar.h> -#include <__type_traits/is_scoped_enum.h> #include <__type_traits/is_signed.h> -#include <__type_traits/is_specialization.h> #include <__type_traits/is_standard_layout.h> -#include <__type_traits/is_swappable.h> #include <__type_traits/is_trivial.h> #include <__type_traits/is_trivially_assignable.h> #include <__type_traits/is_trivially_constructible.h> #include <__type_traits/is_trivially_copyable.h> #include <__type_traits/is_trivially_destructible.h> -#include <__type_traits/is_unbounded_array.h> #include <__type_traits/is_union.h> #include <__type_traits/is_unsigned.h> #include <__type_traits/is_void.h> #include <__type_traits/is_volatile.h> -#include <__type_traits/make_const_lvalue_ref.h> #include <__type_traits/make_signed.h> #include <__type_traits/make_unsigned.h> -#include <__type_traits/maybe_const.h> -#include <__type_traits/negation.h> #include <__type_traits/rank.h> #include <__type_traits/remove_all_extents.h> #include <__type_traits/remove_const.h> -#include <__type_traits/remove_const_ref.h> #include <__type_traits/remove_cv.h> #include <__type_traits/remove_extent.h> #include <__type_traits/remove_pointer.h> #include <__type_traits/remove_reference.h> #include <__type_traits/remove_volatile.h> #include <__type_traits/result_of.h> -#include <__type_traits/type_identity.h> #include <__type_traits/underlying_type.h> -#include <__type_traits/unwrap_ref.h> -#include <__type_traits/void_t.h> -#include <__utility/declval.h> -#include -#include + +#if _LIBCPP_STD_VER >= 14 +# include <__type_traits/is_final.h> +# include <__type_traits/is_null_pointer.h> +#endif + +#if _LIBCPP_STD_VER >= 17 +# include <__type_traits/conjunction.h> +# include <__type_traits/disjunction.h> +# include <__type_traits/has_unique_object_representation.h> +# include <__type_traits/invoke.h> +# include <__type_traits/is_aggregate.h> +# include <__type_traits/is_swappable.h> +# include <__type_traits/negation.h> +# include <__type_traits/void_t.h> +#endif + +#if _LIBCPP_STD_VER >= 20 +# include <__type_traits/common_reference.h> +# include <__type_traits/is_bounded_array.h> +# include <__type_traits/is_constant_evaluated.h> +# include <__type_traits/is_nothrow_convertible.h> +# include <__type_traits/is_unbounded_array.h> +# include <__type_traits/type_identity.h> +# include <__type_traits/unwrap_ref.h> +#endif + +#if _LIBCPP_STD_VER >= 23 +# include <__type_traits/is_scoped_enum.h> +#endif + #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/utility b/libcxx/include/utility index f2f0052df27552b..f97907fbf72e9d4 100644 --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -247,25 +247,35 @@ template */ #include <__config> -#include <__utility/as_const.h> -#include <__utility/as_lvalue.h> -#include <__utility/auto_cast.h> -#include <__utility/cmp.h> + #include <__utility/declval.h> -#include <__utility/exception_guard.h> -#include <__utility/exchange.h> #include <__utility/forward.h> -#include <__utility/forward_like.h> -#include <__utility/in_place.h> -#include <__utility/integer_sequence.h> #include <__utility/move.h> #include <__utility/pair.h> #include <__utility/piecewise_construct.h> -#include <__utility/priority_tag.h> #include <__utility/rel_ops.h> #include <__utility/swap.h> -#include <__utility/to_underlying.h> -#include <__utility/unreachable.h> + +#if _LIBCPP_STD_VER >= 14 +# include <__utility/exchange.h> +# include <__utility/integer_sequence.h> +#endif + +#if _LIBCPP_STD_VER >= 17 +# include <__utility/as_const.h> +# include <__utility/in_place.h> +#endif + +#if _LIBCPP_STD_VER >= 20 +# include <__utility/cmp.h> +#endif + +#if _LIBCPP_STD_VER >= 23 +# include <__utility/forward_like.h> +# include <__utility/to_underlying.h> +# include <__utility/unreachable.h> +#endif + #include // standard-mandated includes @@ -286,6 +296,10 @@ template # pragma GCC system_header #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include diff --git a/libcxx/test/libcxx/containers/sequences/deque/abi.compile.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/abi.compile.pass.cpp index 9910befb0349e78..7d2dd218f967b24 100644 --- a/libcxx/test/libcxx/containers/sequences/deque/abi.compile.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/deque/abi.compile.pass.cpp @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// +#include #include #include "min_allocator.h" diff --git a/libcxx/test/libcxx/containers/sequences/list/abi.compile.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/abi.compile.pass.cpp index 8ace45d661df6e3..a16ae1d52792158 100644 --- a/libcxx/test/libcxx/containers/sequences/list/abi.compile.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/abi.compile.pass.cpp @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// +#include #include #include "min_allocator.h" diff --git a/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp index feaef53ae09d56f..45d0cc3b95f90b2 100644 --- a/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp +++ b/libcxx/test/libcxx/iterators/bounded_iter/arithmetic.pass.cpp @@ -11,8 +11,8 @@ // // Arithmetic operators +#include <__iterator/bounded_iter.h> #include -#include #include "test_iterators.h" #include "test_macros.h" diff --git a/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp index f4b0da9511eaff7..9c5df5da55b9c6c 100644 --- a/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp +++ b/libcxx/test/libcxx/iterators/bounded_iter/comparison.pass.cpp @@ -11,7 +11,7 @@ // // Comparison operators -#include +#include <__iterator/bounded_iter.h> #include "test_iterators.h" #include "test_macros.h" diff --git a/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp index bf723f14e80a94d..7e3a59a49ffd43b 100644 --- a/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp +++ b/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp @@ -16,7 +16,7 @@ // UNSUPPORTED: libcpp-hardening-mode=none // XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing -#include +#include <__iterator/bounded_iter.h> #include "check_assertion.h" #include "test_iterators.h" diff --git a/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp index 6ae0928b7e52806..bfd779d644f51a7 100644 --- a/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp +++ b/libcxx/test/libcxx/iterators/bounded_iter/pointer_traits.pass.cpp @@ -11,9 +11,10 @@ // // std::pointer_traits specialization +#include <__iterator/bounded_iter.h> #include #include -#include +#include #include #include "test_iterators.h" diff --git a/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp index db95513055f8175..56ded9ae5ed21d3 100644 --- a/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp +++ b/libcxx/test/libcxx/iterators/bounded_iter/types.compile.pass.cpp @@ -11,6 +11,7 @@ // // Nested types +#include <__iterator/bounded_iter.h> #include #include #include diff --git a/libcxx/test/libcxx/memory/allocation_guard.pass.cpp b/libcxx/test/libcxx/memory/allocation_guard.pass.cpp index 4b2f7abe9159b79..493ebf044187c88 100644 --- a/libcxx/test/libcxx/memory/allocation_guard.pass.cpp +++ b/libcxx/test/libcxx/memory/allocation_guard.pass.cpp @@ -15,8 +15,8 @@ // template // struct __allocation_guard; +#include <__memory/allocation_guard.h> #include -#include #include #include diff --git a/libcxx/test/libcxx/memory/compressed_pair/compressed_pair.pass.cpp b/libcxx/test/libcxx/memory/compressed_pair/compressed_pair.pass.cpp index 8bc890a208d0c67..4258089813e0d4f 100644 --- a/libcxx/test/libcxx/memory/compressed_pair/compressed_pair.pass.cpp +++ b/libcxx/test/libcxx/memory/compressed_pair/compressed_pair.pass.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// +#include <__memory/compressed_pair.h> #include -#include #include #include "test_macros.h" diff --git a/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp b/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp index a826555d48dda0f..aed78f9cddf846e 100644 --- a/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp +++ b/libcxx/test/libcxx/numerics/clamp_to_integral.pass.cpp @@ -12,10 +12,10 @@ // closest representable value for the specified integer type, or // numeric_limits::max()/min() if the value isn't representable. +#include <__random/clamp_to_integral.h> #include #include #include -#include // for __clamp_to_integral template void test() { diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.adaptor.helpers/as-lvalue.lifetimebound.verify.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.adaptor.helpers/as-lvalue.lifetimebound.verify.cpp index 7046936b1b7a7f7..b60f17236335053 100644 --- a/libcxx/test/libcxx/ranges/range.adaptors/range.adaptor.helpers/as-lvalue.lifetimebound.verify.cpp +++ b/libcxx/test/libcxx/ranges/range.adaptors/range.adaptor.helpers/as-lvalue.lifetimebound.verify.cpp @@ -11,7 +11,7 @@ // template // constexpr T& as-lvalue(T&& t) { // exposition only -#include +#include <__utility/as_lvalue.h> void test() { // Check prvalue diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.adaptor.helpers/as-lvalue.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.adaptor.helpers/as-lvalue.pass.cpp index 721279fcd586b00..8e47a507f2f8abc 100644 --- a/libcxx/test/libcxx/ranges/range.adaptors/range.adaptor.helpers/as-lvalue.pass.cpp +++ b/libcxx/test/libcxx/ranges/range.adaptors/range.adaptor.helpers/as-lvalue.pass.cpp @@ -11,6 +11,7 @@ // template // constexpr T& as-lvalue(T&& t) { // exposition only +#include <__utility/as_lvalue.h> #include #include diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv index 65c805cd86b76d9..51e659f52000b4c 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx03.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv @@ -960,6 +960,7 @@ unordered_set type_traits unordered_set version utility compare utility cstddef +utility cstdint utility cstdlib utility initializer_list utility iosfwd diff --git a/libcxx/test/libcxx/transitive_includes/cxx11.csv b/libcxx/test/libcxx/transitive_includes/cxx11.csv index bf353b2dd4ce473..17e85e982729cf8 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx11.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx11.csv @@ -967,6 +967,7 @@ unordered_set type_traits unordered_set version utility compare utility cstddef +utility cstdint utility cstdlib utility initializer_list utility iosfwd diff --git a/libcxx/test/libcxx/transitive_includes/cxx14.csv b/libcxx/test/libcxx/transitive_includes/cxx14.csv index fa6e44873fc1261..8aed93da9e6ccf6 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx14.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx14.csv @@ -970,6 +970,7 @@ unordered_set type_traits unordered_set version utility compare utility cstddef +utility cstdint utility cstdlib utility initializer_list utility iosfwd diff --git a/libcxx/test/libcxx/transitive_includes/cxx17.csv b/libcxx/test/libcxx/transitive_includes/cxx17.csv index e03f74f50b9144f..2c028462144eeee 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx17.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx17.csv @@ -971,6 +971,7 @@ unordered_set type_traits unordered_set version utility compare utility cstddef +utility cstdint utility cstdlib utility initializer_list utility iosfwd diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv index 37cd4e58e7fcade..982c2013e34170f 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx20.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv @@ -682,6 +682,7 @@ ranges optional ranges span ranges tuple ranges type_traits +ranges variant ranges version ratio climits ratio cstdint @@ -977,6 +978,7 @@ unordered_set type_traits unordered_set version utility compare utility cstddef +utility cstdint utility cstdlib utility initializer_list utility iosfwd diff --git a/libcxx/test/libcxx/transitive_includes/cxx23.csv b/libcxx/test/libcxx/transitive_includes/cxx23.csv index 098752e8699f799..8ffb71d8b566b00 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx23.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx23.csv @@ -456,7 +456,6 @@ ranges cwchar ranges initializer_list ranges iterator ranges limits -ranges new ranges optional ranges span ranges tuple diff --git a/libcxx/test/libcxx/transitive_includes/cxx26.csv b/libcxx/test/libcxx/transitive_includes/cxx26.csv index 098752e8699f799..8ffb71d8b566b00 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx26.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx26.csv @@ -456,7 +456,6 @@ ranges cwchar ranges initializer_list ranges iterator ranges limits -ranges new ranges optional ranges span ranges tuple diff --git a/libcxx/test/libcxx/type_traits/is_callable.compile.pass.cpp b/libcxx/test/libcxx/type_traits/is_callable.compile.pass.cpp index f7f76bbe9bef0ca..d7bd701aa706ab2 100644 --- a/libcxx/test/libcxx/type_traits/is_callable.compile.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_callable.compile.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include <__type_traits/is_callable.h> struct Functor { void operator()(); diff --git a/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp b/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp index 55398f8ad64ba0a..5a779c0e96e2105 100644 --- a/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp @@ -14,7 +14,7 @@ // returns false when there's no constant evaluation support from the compiler. // as well as when called not in a constexpr context -#include +#include <__type_traits/is_constant_evaluated.h> #include #include "test_macros.h" diff --git a/libcxx/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp b/libcxx/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp index e1951cbc8446fd6..ff0ab6f68df6773 100644 --- a/libcxx/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp @@ -12,8 +12,7 @@ // __is_implicitly_default_constructible -#include - +#include <__type_traits/is_implicitly_default_constructible.h> struct ExplicitlyDefaultConstructible1 { explicit ExplicitlyDefaultConstructible1() = default; diff --git a/libcxx/test/libcxx/type_traits/is_specialization.compile.pass.cpp b/libcxx/test/libcxx/type_traits/is_specialization.compile.pass.cpp index 134e5f5d186a674..73dfc773aa774f6 100644 --- a/libcxx/test/libcxx/type_traits/is_specialization.compile.pass.cpp +++ b/libcxx/test/libcxx/type_traits/is_specialization.compile.pass.cpp @@ -14,10 +14,7 @@ // Note instantiation for certain type combinations are ill-formed. These are // tested in is_specialization.verify.cpp. -#include - -#include -#include +#include <__type_traits/is_specialization.h> #include #include #include diff --git a/libcxx/test/libcxx/type_traits/is_specialization.verify.cpp b/libcxx/test/libcxx/type_traits/is_specialization.verify.cpp index 2fd1176417538f8..a798647d56ee1c5 100644 --- a/libcxx/test/libcxx/type_traits/is_specialization.verify.cpp +++ b/libcxx/test/libcxx/type_traits/is_specialization.verify.cpp @@ -13,8 +13,7 @@ // // Tests the ill-formed instantiations. -#include - +#include <__type_traits/is_specialization.h> #include #include diff --git a/libcxx/test/libcxx/type_traits/lazy_metafunctions.pass.cpp b/libcxx/test/libcxx/type_traits/lazy_metafunctions.pass.cpp index 51ff16135760559..669bcdb58d7baaa 100644 --- a/libcxx/test/libcxx/type_traits/lazy_metafunctions.pass.cpp +++ b/libcxx/test/libcxx/type_traits/lazy_metafunctions.pass.cpp @@ -14,6 +14,9 @@ // Test the libc++ lazy meta-programming helpers in +#include <__type_traits/conjunction.h> +#include <__type_traits/disjunction.h> +#include <__type_traits/negation.h> #include #include "test_macros.h" diff --git a/libcxx/test/libcxx/utilities/exception_guard.no_exceptions.pass.cpp b/libcxx/test/libcxx/utilities/exception_guard.no_exceptions.pass.cpp index 7f2bcbca11ca073..60cf4f7814597fb 100644 --- a/libcxx/test/libcxx/utilities/exception_guard.no_exceptions.pass.cpp +++ b/libcxx/test/libcxx/utilities/exception_guard.no_exceptions.pass.cpp @@ -10,6 +10,7 @@ // ADDITIONAL_COMPILE_FLAGS: -fno-exceptions +#include <__utility/exception_guard.h> #include int main(int, char**) { diff --git a/libcxx/test/libcxx/utilities/exception_guard.pass.cpp b/libcxx/test/libcxx/utilities/exception_guard.pass.cpp index 71e60fc94542d86..0728959c7277b9f 100644 --- a/libcxx/test/libcxx/utilities/exception_guard.pass.cpp +++ b/libcxx/test/libcxx/utilities/exception_guard.pass.cpp @@ -10,6 +10,7 @@ // UNSUPPORTED: no-exceptions +#include <__utility/exception_guard.h> #include #include #include diff --git a/libcxx/test/libcxx/utilities/function.objects/func.bind.partial/compose.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.bind.partial/compose.pass.cpp index a39352e539135f1..7e597081cfaad6b 100644 --- a/libcxx/test/libcxx/utilities/function.objects/func.bind.partial/compose.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/func.bind.partial/compose.pass.cpp @@ -11,7 +11,7 @@ // template // constexpr unspecified __compose(F1&&, F2&&); -#include +#include <__functional/compose.h> #include #include #include diff --git a/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp b/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp index 4696e3f6678306c..5d0c5586d9b3d5d 100644 --- a/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp +++ b/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp @@ -10,9 +10,12 @@ #include "test_macros.h" TEST_CLANG_DIAGNOSTIC_IGNORED("-Wprivate-header") +#include <__type_traits/conjunction.h> +#include <__type_traits/disjunction.h> #include <__type_traits/is_valid_expansion.h> -#include +#include <__type_traits/negation.h> #include +#include struct Bomb; template diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp index 8d9df94eee5a626..f69351209e4f13c 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "almost_satisfies_types.h" diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp index 2f13bdc76f793e3..9efe2513271ed30 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "almost_satisfies_types.h" diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp index 6f8a1a20c965c36..571da879ed3f547 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "almost_satisfies_types.h" diff --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp index 155f88010309c11..2dddd84d8796ebe 100644 --- a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include "test_iterators.h" #include "test_macros.h" diff --git a/libcxx/test/std/ranges/range.factories/range.repeat.view/iterator/plus_eq.pass.cpp b/libcxx/test/std/ranges/range.factories/range.repeat.view/iterator/plus_eq.pass.cpp index a4696d73839b6b0..549ebffe5c97ecb 100644 --- a/libcxx/test/std/ranges/range.factories/range.repeat.view/iterator/plus_eq.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.repeat.view/iterator/plus_eq.pass.cpp @@ -10,9 +10,10 @@ // constexpr iterator& operator+=(difference_type n); -#include #include #include +#include +#include constexpr bool test() { std::ranges::repeat_view v(10); diff --git a/libcxx/test/support/test_iterators.h b/libcxx/test/support/test_iterators.h index aa819ecd4733bd3..bb3ba2182f557a9 100644 --- a/libcxx/test/support/test_iterators.h +++ b/libcxx/test/support/test_iterators.h @@ -11,6 +11,7 @@ #include #include +#include #include #include #include