diff --git a/libcxx/include/__algorithm/copy.h b/libcxx/include/__algorithm/copy.h --- a/libcxx/include/__algorithm/copy.h +++ b/libcxx/include/__algorithm/copy.h @@ -14,10 +14,15 @@ #include <__config> #include <__iterator/iterator_traits.h> #include <__iterator/reverse_iterator.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_copy_constructible.h> +#include <__type_traits/is_same.h> +#include <__type_traits/is_trivially_copy_assignable.h> +#include <__type_traits/is_trivially_copyable.h> +#include <__type_traits/remove_const.h> #include <__utility/move.h> #include <__utility/pair.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__algorithm/iterator_operations.h b/libcxx/include/__algorithm/iterator_operations.h --- a/libcxx/include/__algorithm/iterator_operations.h +++ b/libcxx/include/__algorithm/iterator_operations.h @@ -21,10 +21,13 @@ #include <__iterator/next.h> #include <__iterator/prev.h> #include <__iterator/readable_traits.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_reference.h> +#include <__type_traits/is_same.h> +#include <__type_traits/remove_cvref.h> #include <__utility/declval.h> #include <__utility/forward.h> #include <__utility/move.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__algorithm/move.h b/libcxx/include/__algorithm/move.h --- a/libcxx/include/__algorithm/move.h +++ b/libcxx/include/__algorithm/move.h @@ -14,10 +14,14 @@ #include <__config> #include <__iterator/iterator_traits.h> #include <__iterator/reverse_iterator.h> +#include <__type_traits/is_constant_evaluated.h> +#include <__type_traits/is_copy_constructible.h> +#include <__type_traits/is_trivially_copyable.h> +#include <__type_traits/is_trivially_move_assignable.h> +#include <__type_traits/remove_const.h> #include <__utility/move.h> #include <__utility/pair.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__algorithm/ranges_iterator_concept.h b/libcxx/include/__algorithm/ranges_iterator_concept.h --- a/libcxx/include/__algorithm/ranges_iterator_concept.h +++ b/libcxx/include/__algorithm/ranges_iterator_concept.h @@ -12,7 +12,7 @@ #include <__config> #include <__iterator/concepts.h> #include <__iterator/iterator_traits.h> -#include +#include <__type_traits/remove_cvref.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__algorithm/unwrap_iter.h b/libcxx/include/__algorithm/unwrap_iter.h --- a/libcxx/include/__algorithm/unwrap_iter.h +++ b/libcxx/include/__algorithm/unwrap_iter.h @@ -12,8 +12,10 @@ #include <__config> #include <__iterator/iterator_traits.h> #include <__memory/pointer_traits.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_copy_constructible.h> +#include <__utility/declval.h> #include <__utility/move.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__bit/bit_cast.h b/libcxx/include/__bit/bit_cast.h --- a/libcxx/include/__bit/bit_cast.h +++ b/libcxx/include/__bit/bit_cast.h @@ -11,7 +11,7 @@ #define _LIBCPP___BIT_BIT_CAST_H #include <__config> -#include +#include <__type_traits/is_trivially_copyable.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__compare/compare_partial_order_fallback.h b/libcxx/include/__compare/compare_partial_order_fallback.h --- a/libcxx/include/__compare/compare_partial_order_fallback.h +++ b/libcxx/include/__compare/compare_partial_order_fallback.h @@ -12,9 +12,10 @@ #include <__compare/ordering.h> #include <__compare/partial_order.h> #include <__config> +#include <__type_traits/decay.h> +#include <__type_traits/is_same.h> #include <__utility/forward.h> #include <__utility/priority_tag.h> -#include #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER # pragma GCC system_header diff --git a/libcxx/include/__compare/compare_strong_order_fallback.h b/libcxx/include/__compare/compare_strong_order_fallback.h --- a/libcxx/include/__compare/compare_strong_order_fallback.h +++ b/libcxx/include/__compare/compare_strong_order_fallback.h @@ -12,9 +12,10 @@ #include <__compare/ordering.h> #include <__compare/strong_order.h> #include <__config> +#include <__type_traits/decay.h> +#include <__type_traits/is_same.h> #include <__utility/forward.h> #include <__utility/priority_tag.h> -#include #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER # pragma GCC system_header diff --git a/libcxx/include/__compare/compare_three_way_result.h b/libcxx/include/__compare/compare_three_way_result.h --- a/libcxx/include/__compare/compare_three_way_result.h +++ b/libcxx/include/__compare/compare_three_way_result.h @@ -11,7 +11,7 @@ #include <__config> #include <__type_traits/make_const_lvalue_ref.h> -#include +#include <__utility/declval.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__compare/compare_weak_order_fallback.h b/libcxx/include/__compare/compare_weak_order_fallback.h --- a/libcxx/include/__compare/compare_weak_order_fallback.h +++ b/libcxx/include/__compare/compare_weak_order_fallback.h @@ -12,9 +12,10 @@ #include <__compare/ordering.h> #include <__compare/weak_order.h> #include <__config> +#include <__type_traits/decay.h> +#include <__type_traits/is_same.h> #include <__utility/forward.h> #include <__utility/priority_tag.h> -#include #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER # pragma GCC system_header diff --git a/libcxx/include/__compare/partial_order.h b/libcxx/include/__compare/partial_order.h --- a/libcxx/include/__compare/partial_order.h +++ b/libcxx/include/__compare/partial_order.h @@ -13,9 +13,10 @@ #include <__compare/ordering.h> #include <__compare/weak_order.h> #include <__config> +#include <__type_traits/decay.h> +#include <__type_traits/is_same.h> #include <__utility/forward.h> #include <__utility/priority_tag.h> -#include #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER # pragma GCC system_header diff --git a/libcxx/include/__compare/strong_order.h b/libcxx/include/__compare/strong_order.h --- a/libcxx/include/__compare/strong_order.h +++ b/libcxx/include/__compare/strong_order.h @@ -13,12 +13,13 @@ #include <__compare/compare_three_way.h> #include <__compare/ordering.h> #include <__config> +#include <__type_traits/conditional.h> +#include <__type_traits/decay.h> #include <__utility/forward.h> #include <__utility/priority_tag.h> #include #include #include -#include #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER # pragma GCC system_header diff --git a/libcxx/include/__compare/weak_order.h b/libcxx/include/__compare/weak_order.h --- a/libcxx/include/__compare/weak_order.h +++ b/libcxx/include/__compare/weak_order.h @@ -13,10 +13,10 @@ #include <__compare/ordering.h> #include <__compare/strong_order.h> #include <__config> +#include <__type_traits/decay.h> #include <__utility/forward.h> #include <__utility/priority_tag.h> #include -#include #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER # pragma GCC system_header diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h --- a/libcxx/include/__functional/hash.h +++ b/libcxx/include/__functional/hash.h @@ -10,9 +10,15 @@ #define _LIBCPP___FUNCTIONAL_HASH_H #include <__config> +#include <__functional/invoke.h> #include <__functional/unary_function.h> #include <__fwd/hash.h> #include <__tuple_dir/sfinae_helpers.h> +#include <__type_traits/is_copy_constructible.h> +#include <__type_traits/is_default_constructible.h> +#include <__type_traits/is_enum.h> +#include <__type_traits/is_move_constructible.h> +#include <__type_traits/underlying_type.h> #include <__utility/forward.h> #include <__utility/move.h> #include <__utility/pair.h> @@ -21,7 +27,6 @@ #include #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h --- a/libcxx/include/__functional/reference_wrapper.h +++ b/libcxx/include/__functional/reference_wrapper.h @@ -11,10 +11,13 @@ #define _LIBCPP___FUNCTIONAL_REFERENCE_WRAPPER_H #include <__config> +#include <__functional/invoke.h> #include <__functional/weak_result_type.h> #include <__memory/addressof.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/remove_cvref.h> +#include <__utility/declval.h> #include <__utility/forward.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__functional/weak_result_type.h b/libcxx/include/__functional/weak_result_type.h --- a/libcxx/include/__functional/weak_result_type.h +++ b/libcxx/include/__functional/weak_result_type.h @@ -12,8 +12,11 @@ #include <__config> #include <__functional/binary_function.h> +#include <__functional/invoke.h> #include <__functional/unary_function.h> -#include +#include <__type_traits/integral_constant.h> +#include <__type_traits/is_same.h> +#include <__utility/declval.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h --- a/libcxx/include/__iterator/advance.h +++ b/libcxx/include/__iterator/advance.h @@ -17,12 +17,14 @@ #include <__iterator/concepts.h> #include <__iterator/incrementable_traits.h> #include <__iterator/iterator_traits.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_integral.h> #include <__utility/convert_to_integral.h> +#include <__utility/declval.h> #include <__utility/move.h> #include <__utility/unreachable.h> #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h --- a/libcxx/include/__iterator/concepts.h +++ b/libcxx/include/__iterator/concepts.h @@ -26,13 +26,19 @@ #include <__concepts/semiregular.h> #include <__concepts/totally_ordered.h> #include <__config> +#include <__functional/invoke.h> #include <__iterator/incrementable_traits.h> #include <__iterator/iter_move.h> #include <__iterator/iterator_traits.h> #include <__iterator/readable_traits.h> #include <__memory/pointer_traits.h> +#include <__type_traits/add_pointer.h> +#include <__type_traits/common_reference.h> +#include <__type_traits/is_pointer.h> +#include <__type_traits/is_reference.h> +#include <__type_traits/remove_cv.h> +#include <__type_traits/remove_cvref.h> #include <__utility/forward.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/distance.h b/libcxx/include/__iterator/distance.h --- a/libcxx/include/__iterator/distance.h +++ b/libcxx/include/__iterator/distance.h @@ -17,7 +17,8 @@ #include <__ranges/access.h> #include <__ranges/concepts.h> #include <__ranges/size.h> -#include +#include <__type_traits/decay.h> +#include <__type_traits/remove_cvref.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/incrementable_traits.h b/libcxx/include/__iterator/incrementable_traits.h --- a/libcxx/include/__iterator/incrementable_traits.h +++ b/libcxx/include/__iterator/incrementable_traits.h @@ -12,9 +12,13 @@ #include <__concepts/arithmetic.h> #include <__config> +#include <__type_traits/conditional.h> +#include <__type_traits/is_object.h> #include <__type_traits/is_primary_template.h> +#include <__type_traits/make_signed.h> +#include <__type_traits/remove_cvref.h> +#include <__utility/declval.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/iter_move.h b/libcxx/include/__iterator/iter_move.h --- a/libcxx/include/__iterator/iter_move.h +++ b/libcxx/include/__iterator/iter_move.h @@ -13,9 +13,11 @@ #include <__concepts/class_or_enum.h> #include <__config> #include <__iterator/iterator_traits.h> +#include <__type_traits/is_reference.h> +#include <__type_traits/remove_cvref.h> +#include <__utility/declval.h> #include <__utility/forward.h> #include <__utility/move.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/iter_swap.h b/libcxx/include/__iterator/iter_swap.h --- a/libcxx/include/__iterator/iter_swap.h +++ b/libcxx/include/__iterator/iter_swap.h @@ -17,9 +17,10 @@ #include <__iterator/iter_move.h> #include <__iterator/iterator_traits.h> #include <__iterator/readable_traits.h> +#include <__type_traits/remove_cvref.h> +#include <__utility/declval.h> #include <__utility/forward.h> #include <__utility/move.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h --- a/libcxx/include/__iterator/iterator_traits.h +++ b/libcxx/include/__iterator/iterator_traits.h @@ -21,8 +21,21 @@ #include <__fwd/pair.h> #include <__iterator/incrementable_traits.h> #include <__iterator/readable_traits.h> +#include <__type_traits/add_const.h> +#include <__type_traits/common_reference.h> +#include <__type_traits/conditional.h> +#include <__type_traits/disjunction.h> +#include <__type_traits/is_convertible.h> +#include <__type_traits/is_object.h> +#include <__type_traits/is_primary_template.h> +#include <__type_traits/is_reference.h> +#include <__type_traits/is_valid_expansion.h> +#include <__type_traits/remove_const.h> +#include <__type_traits/remove_cv.h> +#include <__type_traits/remove_cvref.h> +#include <__type_traits/void_t.h> +#include <__utility/declval.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/next.h b/libcxx/include/__iterator/next.h --- a/libcxx/include/__iterator/next.h +++ b/libcxx/include/__iterator/next.h @@ -16,7 +16,7 @@ #include <__iterator/concepts.h> #include <__iterator/incrementable_traits.h> #include <__iterator/iterator_traits.h> -#include +#include <__type_traits/enable_if.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/prev.h b/libcxx/include/__iterator/prev.h --- a/libcxx/include/__iterator/prev.h +++ b/libcxx/include/__iterator/prev.h @@ -16,7 +16,7 @@ #include <__iterator/concepts.h> #include <__iterator/incrementable_traits.h> #include <__iterator/iterator_traits.h> -#include +#include <__type_traits/enable_if.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/readable_traits.h b/libcxx/include/__iterator/readable_traits.h --- a/libcxx/include/__iterator/readable_traits.h +++ b/libcxx/include/__iterator/readable_traits.h @@ -12,7 +12,13 @@ #include <__concepts/same_as.h> #include <__config> -#include +#include <__type_traits/conditional.h> +#include <__type_traits/is_array.h> +#include <__type_traits/is_object.h> +#include <__type_traits/is_primary_template.h> +#include <__type_traits/remove_cv.h> +#include <__type_traits/remove_cvref.h> +#include <__type_traits/remove_extent.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h --- a/libcxx/include/__iterator/reverse_iterator.h +++ b/libcxx/include/__iterator/reverse_iterator.h @@ -29,8 +29,15 @@ #include <__ranges/access.h> #include <__ranges/concepts.h> #include <__ranges/subrange.h> +#include <__type_traits/conditional.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_assignable.h> +#include <__type_traits/is_convertible.h> +#include <__type_traits/is_nothrow_copy_constructible.h> +#include <__type_traits/is_pointer.h> +#include <__type_traits/is_same.h> +#include <__utility/declval.h> #include <__utility/move.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/allocator.h b/libcxx/include/__memory/allocator.h --- a/libcxx/include/__memory/allocator.h +++ b/libcxx/include/__memory/allocator.h @@ -13,11 +13,14 @@ #include <__config> #include <__memory/allocate_at_least.h> #include <__memory/allocator_traits.h> +#include <__type_traits/is_constant_evaluated.h> +#include <__type_traits/is_same.h> +#include <__type_traits/is_void.h> +#include <__type_traits/is_volatile.h> #include <__utility/forward.h> #include #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h --- a/libcxx/include/__memory/allocator_arg_t.h +++ b/libcxx/include/__memory/allocator_arg_t.h @@ -12,8 +12,10 @@ #include <__config> #include <__memory/uses_allocator.h> +#include <__type_traits/integral_constant.h> +#include <__type_traits/is_constructible.h> +#include <__type_traits/remove_cvref.h> #include <__utility/forward.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -13,9 +13,15 @@ #include <__config> #include <__memory/construct_at.h> #include <__memory/pointer_traits.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_copy_constructible.h> +#include <__type_traits/is_empty.h> +#include <__type_traits/is_move_constructible.h> +#include <__type_traits/make_unsigned.h> +#include <__type_traits/remove_reference.h> +#include <__type_traits/void_t.h> #include <__utility/forward.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/assume_aligned.h b/libcxx/include/__memory/assume_aligned.h --- a/libcxx/include/__memory/assume_aligned.h +++ b/libcxx/include/__memory/assume_aligned.h @@ -12,9 +12,9 @@ #include <__assert> #include <__config> +#include <__type_traits/is_constant_evaluated.h> #include #include -#include // for is_constant_evaluated() #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/compressed_pair.h b/libcxx/include/__memory/compressed_pair.h --- a/libcxx/include/__memory/compressed_pair.h +++ b/libcxx/include/__memory/compressed_pair.h @@ -14,11 +14,18 @@ #include <__fwd/get.h> #include <__fwd/tuple.h> #include <__tuple_dir/tuple_indices.h> +#include <__type_traits/decay.h> #include <__type_traits/dependent_type.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_default_constructible.h> +#include <__type_traits/is_empty.h> +#include <__type_traits/is_final.h> +#include <__type_traits/is_same.h> +#include <__type_traits/is_swappable.h> #include <__utility/forward.h> #include <__utility/move.h> #include <__utility/piecewise_construct.h> -#include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/concepts.h b/libcxx/include/__memory/concepts.h --- a/libcxx/include/__memory/concepts.h +++ b/libcxx/include/__memory/concepts.h @@ -17,7 +17,8 @@ #include <__iterator/readable_traits.h> #include <__ranges/access.h> #include <__ranges/concepts.h> -#include +#include <__type_traits/is_reference.h> +#include <__type_traits/remove_cvref.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/construct_at.h b/libcxx/include/__memory/construct_at.h --- a/libcxx/include/__memory/construct_at.h +++ b/libcxx/include/__memory/construct_at.h @@ -15,10 +15,12 @@ #include <__iterator/access.h> #include <__memory/addressof.h> #include <__memory/voidify.h> +#include <__type_traits/enable_if.h> +#include <__type_traits/is_array.h> +#include <__utility/declval.h> #include <__utility/forward.h> #include <__utility/move.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h --- a/libcxx/include/__memory/pointer_traits.h +++ b/libcxx/include/__memory/pointer_traits.h @@ -12,8 +12,15 @@ #include <__config> #include <__memory/addressof.h> +#include <__type_traits/conditional.h> +#include <__type_traits/conjunction.h> +#include <__type_traits/decay.h> +#include <__type_traits/is_class.h> +#include <__type_traits/is_function.h> +#include <__type_traits/is_void.h> +#include <__type_traits/void_t.h> +#include <__utility/declval.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/ranges_uninitialized_algorithms.h b/libcxx/include/__memory/ranges_uninitialized_algorithms.h --- a/libcxx/include/__memory/ranges_uninitialized_algorithms.h +++ b/libcxx/include/__memory/ranges_uninitialized_algorithms.h @@ -23,9 +23,9 @@ #include <__ranges/access.h> #include <__ranges/concepts.h> #include <__ranges/dangling.h> +#include <__type_traits/remove_reference.h> #include <__utility/move.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -37,7 +37,6 @@ #include #include #include -#include #include #if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER) # include diff --git a/libcxx/include/__memory/uninitialized_algorithms.h b/libcxx/include/__memory/uninitialized_algorithms.h --- a/libcxx/include/__memory/uninitialized_algorithms.h +++ b/libcxx/include/__memory/uninitialized_algorithms.h @@ -20,12 +20,21 @@ #include <__memory/construct_at.h> #include <__memory/pointer_traits.h> #include <__memory/voidify.h> +#include <__type_traits/extent.h> +#include <__type_traits/is_array.h> #include <__type_traits/is_constant_evaluated.h> +#include <__type_traits/is_trivially_copy_assignable.h> +#include <__type_traits/is_trivially_copy_constructible.h> +#include <__type_traits/is_trivially_move_assignable.h> +#include <__type_traits/is_trivially_move_constructible.h> +#include <__type_traits/is_unbounded_array.h> +#include <__type_traits/negation.h> +#include <__type_traits/remove_const.h> +#include <__type_traits/remove_extent.h> #include <__utility/move.h> #include <__utility/pair.h> #include <__utility/transaction.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h --- a/libcxx/include/__memory/unique_ptr.h +++ b/libcxx/include/__memory/unique_ptr.h @@ -19,10 +19,26 @@ #include <__memory/allocator_traits.h> // __pointer #include <__memory/auto_ptr.h> #include <__memory/compressed_pair.h> +#include <__type_traits/add_lvalue_reference.h> +#include <__type_traits/common_type.h> +#include <__type_traits/dependent_type.h> +#include <__type_traits/integral_constant.h> +#include <__type_traits/is_array.h> +#include <__type_traits/is_assignable.h> +#include <__type_traits/is_constructible.h> +#include <__type_traits/is_convertible.h> +#include <__type_traits/is_default_constructible.h> +#include <__type_traits/is_function.h> +#include <__type_traits/is_pointer.h> +#include <__type_traits/is_reference.h> +#include <__type_traits/is_same.h> +#include <__type_traits/is_swappable.h> +#include <__type_traits/is_void.h> +#include <__type_traits/remove_extent.h> +#include <__type_traits/type_identity.h> #include <__utility/forward.h> #include <__utility/move.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/uses_allocator.h b/libcxx/include/__memory/uses_allocator.h --- a/libcxx/include/__memory/uses_allocator.h +++ b/libcxx/include/__memory/uses_allocator.h @@ -11,8 +11,8 @@ #define _LIBCPP___MEMORY_USES_ALLOCATOR_H #include <__config> +#include <__type_traits/is_convertible.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__ranges/access.h b/libcxx/include/__ranges/access.h --- a/libcxx/include/__ranges/access.h +++ b/libcxx/include/__ranges/access.h @@ -15,8 +15,13 @@ #include <__iterator/concepts.h> #include <__iterator/readable_traits.h> #include <__ranges/enable_borrowed_range.h> +#include <__type_traits/decay.h> +#include <__type_traits/is_reference.h> +#include <__type_traits/remove_cvref.h> +#include <__type_traits/remove_reference.h> #include <__utility/auto_cast.h> -#include +#include <__utility/declval.h> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__ranges/concepts.h b/libcxx/include/__ranges/concepts.h --- a/libcxx/include/__ranges/concepts.h +++ b/libcxx/include/__ranges/concepts.h @@ -24,8 +24,12 @@ #include <__ranges/enable_borrowed_range.h> #include <__ranges/enable_view.h> #include <__ranges/size.h> +#include <__type_traits/add_pointer.h> +#include <__type_traits/is_reference.h> +#include <__type_traits/remove_cvref.h> +#include <__type_traits/remove_reference.h> +#include <__utility/declval.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__ranges/dangling.h b/libcxx/include/__ranges/dangling.h --- a/libcxx/include/__ranges/dangling.h +++ b/libcxx/include/__ranges/dangling.h @@ -13,7 +13,7 @@ #include <__config> #include <__ranges/access.h> #include <__ranges/concepts.h> -#include +#include <__type_traits/conditional.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__ranges/data.h b/libcxx/include/__ranges/data.h --- a/libcxx/include/__ranges/data.h +++ b/libcxx/include/__ranges/data.h @@ -16,8 +16,13 @@ #include <__iterator/iterator_traits.h> #include <__memory/pointer_traits.h> #include <__ranges/access.h> +#include <__type_traits/decay.h> +#include <__type_traits/is_object.h> +#include <__type_traits/is_pointer.h> +#include <__type_traits/is_reference.h> +#include <__type_traits/remove_pointer.h> +#include <__type_traits/remove_reference.h> #include <__utility/auto_cast.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__ranges/empty.h b/libcxx/include/__ranges/empty.h --- a/libcxx/include/__ranges/empty.h +++ b/libcxx/include/__ranges/empty.h @@ -15,7 +15,6 @@ #include <__iterator/concepts.h> #include <__ranges/access.h> #include <__ranges/size.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__ranges/enable_view.h b/libcxx/include/__ranges/enable_view.h --- a/libcxx/include/__ranges/enable_view.h +++ b/libcxx/include/__ranges/enable_view.h @@ -13,7 +13,9 @@ #include <__concepts/derived_from.h> #include <__concepts/same_as.h> #include <__config> -#include +#include <__type_traits/is_class.h> +#include <__type_traits/is_convertible.h> +#include <__type_traits/remove_cv.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__ranges/size.h b/libcxx/include/__ranges/size.h --- a/libcxx/include/__ranges/size.h +++ b/libcxx/include/__ranges/size.h @@ -16,9 +16,12 @@ #include <__iterator/concepts.h> #include <__iterator/iterator_traits.h> #include <__ranges/access.h> +#include <__type_traits/decay.h> +#include <__type_traits/make_signed.h> +#include <__type_traits/make_unsigned.h> +#include <__type_traits/remove_cvref.h> #include <__utility/auto_cast.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h --- a/libcxx/include/__ranges/subrange.h +++ b/libcxx/include/__ranges/subrange.h @@ -30,8 +30,15 @@ #include <__ranges/view_interface.h> #include <__tuple_dir/tuple_element.h> #include <__tuple_dir/tuple_size.h> +#include <__type_traits/conditional.h> +#include <__type_traits/decay.h> +#include <__type_traits/is_pointer.h> +#include <__type_traits/is_reference.h> +#include <__type_traits/make_unsigned.h> +#include <__type_traits/remove_const.h> +#include <__type_traits/remove_pointer.h> #include <__utility/move.h> -#include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__ranges/view_interface.h b/libcxx/include/__ranges/view_interface.h --- a/libcxx/include/__ranges/view_interface.h +++ b/libcxx/include/__ranges/view_interface.h @@ -21,7 +21,9 @@ #include <__ranges/access.h> #include <__ranges/concepts.h> #include <__ranges/empty.h> -#include +#include <__type_traits/is_class.h> +#include <__type_traits/make_unsigned.h> +#include <__type_traits/remove_cv.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__type_traits/is_trivially_destructible.h b/libcxx/include/__type_traits/is_trivially_destructible.h --- a/libcxx/include/__type_traits/is_trivially_destructible.h +++ b/libcxx/include/__type_traits/is_trivially_destructible.h @@ -11,6 +11,7 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/is_destructible.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/cmath b/libcxx/include/cmath --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -306,7 +306,11 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> -#include +#include <__type_traits/enable_if.h> +#include <__type_traits/is_arithmetic.h> +#include <__type_traits/is_floating_point.h> +#include <__type_traits/is_same.h> +#include <__type_traits/remove_cv.h> #include #include @@ -669,4 +673,8 @@ _LIBCPP_POP_MACROS +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_CMATH diff --git a/libcxx/include/compare b/libcxx/include/compare --- a/libcxx/include/compare +++ b/libcxx/include/compare @@ -160,4 +160,8 @@ # pragma GCC system_header #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_COMPARE diff --git a/libcxx/include/condition_variable b/libcxx/include/condition_variable --- a/libcxx/include/condition_variable +++ b/libcxx/include/condition_variable @@ -270,6 +270,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif #endif // _LIBCPP_CONDITION_VARIABLE diff --git a/libcxx/include/exception b/libcxx/include/exception --- a/libcxx/include/exception +++ b/libcxx/include/exception @@ -80,9 +80,15 @@ #include <__availability> #include <__config> #include <__memory/addressof.h> +#include <__type_traits/decay.h> +#include <__type_traits/is_base_of.h> +#include <__type_traits/is_class.h> +#include <__type_traits/is_convertible.h> +#include <__type_traits/is_copy_constructible.h> +#include <__type_traits/is_final.h> +#include <__type_traits/is_polymorphic.h> #include #include -#include #include // defines its own std::exception and std::bad_exception types, @@ -371,4 +377,8 @@ } // namespace std +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_EXCEPTION diff --git a/libcxx/include/istream b/libcxx/include/istream --- a/libcxx/include/istream +++ b/libcxx/include/istream @@ -1639,6 +1639,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif _LIBCPP_POP_MACROS diff --git a/libcxx/include/math.h b/libcxx/include/math.h --- a/libcxx/include/math.h +++ b/libcxx/include/math.h @@ -307,10 +307,13 @@ // back to C++ linkage before including these C++ headers. extern "C++" { +#include <__type_traits/enable_if.h> +#include <__type_traits/is_floating_point.h> +#include <__type_traits/is_integral.h> +#include <__type_traits/is_same.h> #include <__type_traits/promote.h> #include #include -#include # ifdef fpclassify diff --git a/libcxx/include/mutex b/libcxx/include/mutex --- a/libcxx/include/mutex +++ b/libcxx/include/mutex @@ -706,6 +706,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include #endif #endif // _LIBCPP_MUTEX diff --git a/libcxx/include/new b/libcxx/include/new --- a/libcxx/include/new +++ b/libcxx/include/new @@ -89,10 +89,12 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__availability> #include <__config> +#include <__type_traits/is_function.h> +#include <__type_traits/is_same.h> +#include <__type_traits/remove_cv.h> #include #include #include -#include #include #if defined(_LIBCPP_ABI_VCRUNTIME) @@ -401,4 +403,8 @@ _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_NEW diff --git a/libcxx/include/ostream b/libcxx/include/ostream --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -1191,6 +1191,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include #endif #endif // _LIBCPP_OSTREAM diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator --- a/libcxx/include/scoped_allocator +++ b/libcxx/include/scoped_allocator @@ -725,6 +725,7 @@ # include # include # include +# include # include #endif diff --git a/libcxx/include/valarray b/libcxx/include/valarray --- a/libcxx/include/valarray +++ b/libcxx/include/valarray @@ -353,6 +353,7 @@ #include <__functional/operations.h> #include <__memory/allocator.h> #include <__memory/uninitialized_algorithms.h> +#include <__type_traits/remove_reference.h> #include <__utility/move.h> #include <__utility/swap.h> #include diff --git a/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp b/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp --- a/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp +++ b/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp @@ -13,9 +13,11 @@ // _Tp midpoint(_Tp __a, _Tp __b) noexcept // -#include #include +#include #include +#include + #include "test_macros.h" // Users are not supposed to provide template argument lists for 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 @@ -207,7 +207,6 @@ expected exception expected initializer_list expected new -expected type_traits expected version experimental/algorithm algorithm experimental/algorithm 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 @@ -207,7 +207,6 @@ expected exception expected initializer_list expected new -expected type_traits expected version experimental/algorithm algorithm experimental/algorithm 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 @@ -207,7 +207,6 @@ expected exception expected initializer_list expected new -expected type_traits expected version experimental/algorithm algorithm experimental/algorithm 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 @@ -207,7 +207,6 @@ expected exception expected initializer_list expected new -expected type_traits expected version experimental/algorithm algorithm experimental/algorithm 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 @@ -219,7 +219,6 @@ expected exception expected initializer_list expected new -expected type_traits expected version experimental/algorithm algorithm experimental/algorithm 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 @@ -100,7 +100,6 @@ chrono type_traits chrono version cinttypes cstdint -cmath type_traits cmath version codecvt cctype codecvt cstddef @@ -113,7 +112,6 @@ compare cstddef compare cstdint compare limits -compare type_traits compare version complex cmath complex iosfwd @@ -135,7 +133,6 @@ condition_variable ratio condition_variable stdexcept condition_variable system_error -condition_variable type_traits condition_variable typeinfo condition_variable version coroutine compare @@ -164,7 +161,6 @@ deque version exception cstddef exception cstdlib -exception type_traits exception version execution version expected cstddef @@ -172,7 +168,6 @@ expected exception expected initializer_list expected new -expected type_traits expected version experimental/algorithm algorithm experimental/algorithm cstddef @@ -364,7 +359,6 @@ istream cstddef istream iosfwd istream ostream -istream type_traits istream version iterator compare iterator concepts @@ -432,7 +426,6 @@ memory new memory stdexcept memory tuple -memory type_traits memory typeinfo memory version memory_resource cstddef @@ -456,13 +449,11 @@ mutex stdexcept mutex system_error mutex tuple -mutex type_traits mutex typeinfo mutex version new cstddef new cstdlib new exception -new type_traits new version numbers type_traits numbers version @@ -495,7 +486,6 @@ ostream new ostream stdexcept ostream streambuf -ostream type_traits ostream typeinfo ostream version queue compare @@ -557,7 +547,6 @@ scoped_allocator limits scoped_allocator new scoped_allocator tuple -scoped_allocator type_traits scoped_allocator version semaphore atomic semaphore ctime diff --git a/libcxx/test/std/language.support/support.dynamic/align_val_t.pass.cpp b/libcxx/test/std/language.support/support.dynamic/align_val_t.pass.cpp --- a/libcxx/test/std/language.support/support.dynamic/align_val_t.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/align_val_t.pass.cpp @@ -15,6 +15,7 @@ // UNSUPPORTED: target={{.+}}-zos{{.*}} #include +#include #include "test_macros.h" diff --git a/libcxx/test/support/count_new.h b/libcxx/test/support/count_new.h --- a/libcxx/test/support/count_new.h +++ b/libcxx/test/support/count_new.h @@ -12,6 +12,7 @@ # include # include # include +#include #include "test_macros.h"