From 89b356f05ab7aa3d96fc7b68aece6e7a5bdb0db5 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Wed, 2 Nov 2022 20:27:42 +0100 Subject: [PATCH] [libc++] Granularize includes Reviewed By: ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D137283 --- libcxx/include/__format/buffer.h | 2 +- libcxx/include/__format/format_context.h | 1 - libcxx/include/__format/parser_std_format_spec.h | 2 +- libcxx/include/__functional/ranges_operations.h | 3 +- libcxx/include/__iterator/advance.h | 3 +- libcxx/include/__iterator/common_iterator.h | 8 ++++- libcxx/include/__iterator/concepts.h | 16 ++++++++- libcxx/include/__iterator/counted_iterator.h | 6 +++- libcxx/include/__iterator/incrementable_traits.h | 2 +- libcxx/include/__iterator/iter_swap.h | 3 +- libcxx/include/__iterator/iterator_traits.h | 8 ++++- libcxx/include/__iterator/readable_traits.h | 2 +- libcxx/include/__memory/concepts.h | 2 +- libcxx/include/__ranges/common_view.h | 3 +- libcxx/include/__ranges/copyable_box.h | 4 ++- libcxx/include/__ranges/drop_view.h | 3 +- libcxx/include/__ranges/enable_view.h | 3 +- libcxx/include/__ranges/filter_view.h | 5 ++- libcxx/include/__ranges/non_propagating_cache.h | 1 - libcxx/include/__ranges/range_adaptor.h | 5 ++- libcxx/include/__ranges/ref_view.h | 3 +- libcxx/include/__ranges/single_view.h | 2 +- libcxx/include/__ranges/size.h | 2 +- libcxx/include/__ranges/take_view.h | 3 +- libcxx/include/algorithm | 1 + libcxx/include/any | 1 + libcxx/include/array | 1 + libcxx/include/bitset | 4 +++ libcxx/include/charconv | 1 + libcxx/include/chrono | 4 +++ libcxx/include/codecvt | 4 +++ libcxx/include/condition_variable | 4 +++ libcxx/include/deque | 1 + libcxx/include/ext/hash_map | 1 + libcxx/include/ext/hash_set | 1 + libcxx/include/filesystem | 4 +++ libcxx/include/forward_list | 1 + libcxx/include/fstream | 4 +++ libcxx/include/functional | 2 +- libcxx/include/ios | 4 +++ libcxx/include/istream | 4 +++ libcxx/include/list | 1 + libcxx/include/locale | 1 + libcxx/include/map | 1 + libcxx/include/memory | 1 + libcxx/include/mutex | 1 + libcxx/include/numbers | 6 +++- libcxx/include/numeric | 1 + libcxx/include/queue | 1 + libcxx/include/random | 1 + libcxx/include/regex | 1 + libcxx/include/set | 1 + libcxx/include/span | 1 + libcxx/include/stack | 1 + libcxx/include/string | 1 + libcxx/include/string_view | 1 + libcxx/include/unordered_map | 1 + libcxx/include/unordered_set | 1 + libcxx/include/valarray | 1 + libcxx/include/vector | 1 + libcxx/test/libcxx/transitive_includes/cxx03.csv | 2 -- libcxx/test/libcxx/transitive_includes/cxx11.csv | 2 -- libcxx/test/libcxx/transitive_includes/cxx14.csv | 2 -- libcxx/test/libcxx/transitive_includes/cxx17.csv | 2 -- libcxx/test/libcxx/transitive_includes/cxx20.csv | 2 -- libcxx/test/libcxx/transitive_includes/cxx2b.csv | 38 ---------------------- .../alg.sorting/alg.clamp/ranges.clamp.pass.cpp | 1 + 67 files changed, 133 insertions(+), 74 deletions(-) diff --git a/libcxx/include/__format/buffer.h b/libcxx/include/__format/buffer.h index 4f7577e..60c1f80 100644 --- a/libcxx/include/__format/buffer.h +++ b/libcxx/include/__format/buffer.h @@ -17,6 +17,7 @@ #include <__algorithm/ranges_copy_n.h> #include <__algorithm/transform.h> #include <__algorithm/unwrap_iter.h> +#include <__concepts/same_as.h> #include <__config> #include <__format/concepts.h> #include <__format/enable_insertable.h> @@ -27,7 +28,6 @@ #include <__iterator/iterator_traits.h> #include <__iterator/wrap_iter.h> #include <__utility/move.h> -#include #include #include #include diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h index 19468de..b3c0b34 100644 --- a/libcxx/include/__format/format_context.h +++ b/libcxx/include/__format/format_context.h @@ -18,7 +18,6 @@ #include <__iterator/back_insert_iterator.h> #include <__iterator/concepts.h> #include <__utility/move.h> -#include #include #ifndef _LIBCPP_HAS_NO_LOCALIZATION diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h index bd5b6ae..05f51f7 100644 --- a/libcxx/include/__format/parser_std_format_spec.h +++ b/libcxx/include/__format/parser_std_format_spec.h @@ -19,6 +19,7 @@ #include <__algorithm/find_if.h> #include <__algorithm/min.h> #include <__assert> +#include <__concepts/same_as.h> #include <__config> #include <__debug> #include <__format/format_arg.h> @@ -28,7 +29,6 @@ #include <__format/unicode.h> #include <__variant/monostate.h> #include -#include #include #include #include diff --git a/libcxx/include/__functional/ranges_operations.h b/libcxx/include/__functional/ranges_operations.h index 3f63a86..87081dd 100644 --- a/libcxx/include/__functional/ranges_operations.h +++ b/libcxx/include/__functional/ranges_operations.h @@ -10,9 +10,10 @@ #ifndef _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H #define _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H +#include <__concepts/equality_comparable.h> +#include <__concepts/totally_ordered.h> #include <__config> #include <__utility/forward.h> -#include #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 index e26ad4b..cd6353e 100644 --- a/libcxx/include/__iterator/advance.h +++ b/libcxx/include/__iterator/advance.h @@ -11,6 +11,8 @@ #define _LIBCPP___ITERATOR_ADVANCE_H #include <__assert> +#include <__concepts/assignable.h> +#include <__concepts/same_as.h> #include <__config> #include <__iterator/concepts.h> #include <__iterator/incrementable_traits.h> @@ -18,7 +20,6 @@ #include <__utility/convert_to_integral.h> #include <__utility/move.h> #include <__utility/unreachable.h> -#include #include #include #include diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h index 4de57c5..a1985c9 100644 --- a/libcxx/include/__iterator/common_iterator.h +++ b/libcxx/include/__iterator/common_iterator.h @@ -11,6 +11,13 @@ #define _LIBCPP___ITERATOR_COMMON_ITERATOR_H #include <__assert> +#include <__concepts/assignable.h> +#include <__concepts/constructible.h> +#include <__concepts/convertible_to.h> +#include <__concepts/copyable.h> +#include <__concepts/derived_from.h> +#include <__concepts/equality_comparable.h> +#include <__concepts/same_as.h> #include <__config> #include <__iterator/concepts.h> #include <__iterator/incrementable_traits.h> @@ -18,7 +25,6 @@ #include <__iterator/iter_swap.h> #include <__iterator/iterator_traits.h> #include <__iterator/readable_traits.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h index bd68889..246f84c 100644 --- a/libcxx/include/__iterator/concepts.h +++ b/libcxx/include/__iterator/concepts.h @@ -10,6 +10,21 @@ #ifndef _LIBCPP___ITERATOR_CONCEPTS_H #define _LIBCPP___ITERATOR_CONCEPTS_H +#include <__concepts/arithmetic.h> +#include <__concepts/assignable.h> +#include <__concepts/common_reference_with.h> +#include <__concepts/constructible.h> +#include <__concepts/copyable.h> +#include <__concepts/derived_from.h> +#include <__concepts/equality_comparable.h> +#include <__concepts/invocable.h> +#include <__concepts/movable.h> +#include <__concepts/predicate.h> +#include <__concepts/regular.h> +#include <__concepts/relation.h> +#include <__concepts/same_as.h> +#include <__concepts/semiregular.h> +#include <__concepts/totally_ordered.h> #include <__config> #include <__iterator/incrementable_traits.h> #include <__iterator/iter_move.h> @@ -17,7 +32,6 @@ #include <__iterator/readable_traits.h> #include <__memory/pointer_traits.h> #include <__utility/forward.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__iterator/counted_iterator.h b/libcxx/include/__iterator/counted_iterator.h index aab2c51..8303013 100644 --- a/libcxx/include/__iterator/counted_iterator.h +++ b/libcxx/include/__iterator/counted_iterator.h @@ -10,6 +10,11 @@ #define _LIBCPP___ITERATOR_COUNTED_ITERATOR_H #include <__assert> +#include <__concepts/assignable.h> +#include <__concepts/common_with.h> +#include <__concepts/constructible.h> +#include <__concepts/convertible_to.h> +#include <__concepts/same_as.h> #include <__config> #include <__iterator/concepts.h> #include <__iterator/default_sentinel.h> @@ -21,7 +26,6 @@ #include <__memory/pointer_traits.h> #include <__utility/move.h> #include -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__iterator/incrementable_traits.h b/libcxx/include/__iterator/incrementable_traits.h index e6a5ed7..6f966ec4 100644 --- a/libcxx/include/__iterator/incrementable_traits.h +++ b/libcxx/include/__iterator/incrementable_traits.h @@ -10,9 +10,9 @@ #ifndef _LIBCPP___ITERATOR_INCREMENTABLE_TRAITS_H #define _LIBCPP___ITERATOR_INCREMENTABLE_TRAITS_H +#include <__concepts/arithmetic.h> #include <__config> #include <__type_traits/is_primary_template.h> -#include #include #include diff --git a/libcxx/include/__iterator/iter_swap.h b/libcxx/include/__iterator/iter_swap.h index 9e06464..40272e2 100644 --- a/libcxx/include/__iterator/iter_swap.h +++ b/libcxx/include/__iterator/iter_swap.h @@ -9,6 +9,8 @@ #ifndef _LIBCPP___ITERATOR_ITER_SWAP_H #define _LIBCPP___ITERATOR_ITER_SWAP_H +#include <__concepts/class_or_enum.h> +#include <__concepts/swappable.h> #include <__config> #include <__iterator/concepts.h> #include <__iterator/iter_move.h> @@ -16,7 +18,6 @@ #include <__iterator/readable_traits.h> #include <__utility/forward.h> #include <__utility/move.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h index 918c713..b4cf072 100644 --- a/libcxx/include/__iterator/iterator_traits.h +++ b/libcxx/include/__iterator/iterator_traits.h @@ -10,11 +10,17 @@ #ifndef _LIBCPP___ITERATOR_ITERATOR_TRAITS_H #define _LIBCPP___ITERATOR_ITERATOR_TRAITS_H +#include <__concepts/arithmetic.h> +#include <__concepts/constructible.h> +#include <__concepts/convertible_to.h> +#include <__concepts/copyable.h> +#include <__concepts/equality_comparable.h> +#include <__concepts/same_as.h> +#include <__concepts/totally_ordered.h> #include <__config> #include <__fwd/pair.h> #include <__iterator/incrementable_traits.h> #include <__iterator/readable_traits.h> -#include #include #include diff --git a/libcxx/include/__iterator/readable_traits.h b/libcxx/include/__iterator/readable_traits.h index 500b46a..dc818d8 100644 --- a/libcxx/include/__iterator/readable_traits.h +++ b/libcxx/include/__iterator/readable_traits.h @@ -10,8 +10,8 @@ #ifndef _LIBCPP___ITERATOR_READABLE_TRAITS_H #define _LIBCPP___ITERATOR_READABLE_TRAITS_H +#include <__concepts/same_as.h> #include <__config> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__memory/concepts.h b/libcxx/include/__memory/concepts.h index bc4cff7..76d2a2e 100644 --- a/libcxx/include/__memory/concepts.h +++ b/libcxx/include/__memory/concepts.h @@ -10,13 +10,13 @@ #ifndef _LIBCPP___MEMORY_CONCEPTS_H #define _LIBCPP___MEMORY_CONCEPTS_H +#include <__concepts/same_as.h> #include <__config> #include <__iterator/concepts.h> #include <__iterator/iterator_traits.h> #include <__iterator/readable_traits.h> #include <__ranges/access.h> #include <__ranges/concepts.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__ranges/common_view.h b/libcxx/include/__ranges/common_view.h index ec0c763..aad0d2f 100644 --- a/libcxx/include/__ranges/common_view.h +++ b/libcxx/include/__ranges/common_view.h @@ -9,6 +9,8 @@ #ifndef _LIBCPP___RANGES_COMMON_VIEW_H #define _LIBCPP___RANGES_COMMON_VIEW_H +#include <__concepts/constructible.h> +#include <__concepts/copyable.h> #include <__config> #include <__iterator/common_iterator.h> #include <__iterator/iterator_traits.h> @@ -21,7 +23,6 @@ #include <__ranges/view_interface.h> #include <__utility/forward.h> #include <__utility/move.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__ranges/copyable_box.h b/libcxx/include/__ranges/copyable_box.h index 9b708d9..fb3d6e4 100644 --- a/libcxx/include/__ranges/copyable_box.h +++ b/libcxx/include/__ranges/copyable_box.h @@ -10,11 +10,13 @@ #ifndef _LIBCPP___RANGES_COPYABLE_BOX_H #define _LIBCPP___RANGES_COPYABLE_BOX_H +#include <__concepts/constructible.h> +#include <__concepts/copyable.h> +#include <__concepts/movable.h> #include <__config> #include <__memory/addressof.h> #include <__memory/construct_at.h> #include <__utility/move.h> -#include #include #include diff --git a/libcxx/include/__ranges/drop_view.h b/libcxx/include/__ranges/drop_view.h index 9e0fe16..3131f4b 100644 --- a/libcxx/include/__ranges/drop_view.h +++ b/libcxx/include/__ranges/drop_view.h @@ -11,6 +11,8 @@ #include <__algorithm/min.h> #include <__assert> +#include <__concepts/constructible.h> +#include <__concepts/convertible_to.h> #include <__config> #include <__functional/bind_back.h> #include <__fwd/span.h> @@ -33,7 +35,6 @@ #include <__utility/auto_cast.h> #include <__utility/forward.h> #include <__utility/move.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__ranges/enable_view.h b/libcxx/include/__ranges/enable_view.h index a1e5721..2dc4752 100644 --- a/libcxx/include/__ranges/enable_view.h +++ b/libcxx/include/__ranges/enable_view.h @@ -10,8 +10,9 @@ #ifndef _LIBCPP___RANGES_ENABLE_VIEW_H #define _LIBCPP___RANGES_ENABLE_VIEW_H +#include <__concepts/derived_from.h> +#include <__concepts/same_as.h> #include <__config> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__ranges/filter_view.h b/libcxx/include/__ranges/filter_view.h index 3e50c17..74c07d9 100644 --- a/libcxx/include/__ranges/filter_view.h +++ b/libcxx/include/__ranges/filter_view.h @@ -10,6 +10,10 @@ #define _LIBCPP___RANGES_FILTER_VIEW_H #include <__algorithm/ranges_find_if.h> +#include <__concepts/constructible.h> +#include <__concepts/copyable.h> +#include <__concepts/derived_from.h> +#include <__concepts/equality_comparable.h> #include <__config> #include <__debug> #include <__functional/bind_back.h> @@ -30,7 +34,6 @@ #include <__utility/forward.h> #include <__utility/in_place.h> #include <__utility/move.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__ranges/non_propagating_cache.h b/libcxx/include/__ranges/non_propagating_cache.h index b565af6..76ca73d 100644 --- a/libcxx/include/__ranges/non_propagating_cache.h +++ b/libcxx/include/__ranges/non_propagating_cache.h @@ -14,7 +14,6 @@ #include <__iterator/iterator_traits.h> // iter_reference_t #include <__memory/addressof.h> #include <__utility/forward.h> -#include // constructible_from #include #include diff --git a/libcxx/include/__ranges/range_adaptor.h b/libcxx/include/__ranges/range_adaptor.h index c287a19..37e4817 100644 --- a/libcxx/include/__ranges/range_adaptor.h +++ b/libcxx/include/__ranges/range_adaptor.h @@ -10,13 +10,16 @@ #ifndef _LIBCPP___RANGES_RANGE_ADAPTOR_H #define _LIBCPP___RANGES_RANGE_ADAPTOR_H +#include <__concepts/constructible.h> +#include <__concepts/derived_from.h> +#include <__concepts/invocable.h> +#include <__concepts/same_as.h> #include <__config> #include <__functional/compose.h> #include <__functional/invoke.h> #include <__ranges/concepts.h> #include <__utility/forward.h> #include <__utility/move.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__ranges/ref_view.h b/libcxx/include/__ranges/ref_view.h index 7d1ae74..bf94889 100644 --- a/libcxx/include/__ranges/ref_view.h +++ b/libcxx/include/__ranges/ref_view.h @@ -9,6 +9,8 @@ #ifndef _LIBCPP___RANGES_REF_VIEW_H #define _LIBCPP___RANGES_REF_VIEW_H +#include <__concepts/convertible_to.h> +#include <__concepts/different_from.h> #include <__config> #include <__iterator/concepts.h> #include <__iterator/incrementable_traits.h> @@ -22,7 +24,6 @@ #include <__ranges/size.h> #include <__ranges/view_interface.h> #include <__utility/forward.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__ranges/single_view.h b/libcxx/include/__ranges/single_view.h index 38726c2..e15a0c3 100644 --- a/libcxx/include/__ranges/single_view.h +++ b/libcxx/include/__ranges/single_view.h @@ -9,6 +9,7 @@ #ifndef _LIBCPP___RANGES_SINGLE_VIEW_H #define _LIBCPP___RANGES_SINGLE_VIEW_H +#include <__concepts/constructible.h> #include <__config> #include <__ranges/copyable_box.h> #include <__ranges/range_adaptor.h> @@ -16,7 +17,6 @@ #include <__utility/forward.h> #include <__utility/in_place.h> #include <__utility/move.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__ranges/size.h b/libcxx/include/__ranges/size.h index 0e6d295..e4c8222 100644 --- a/libcxx/include/__ranges/size.h +++ b/libcxx/include/__ranges/size.h @@ -9,13 +9,13 @@ #ifndef _LIBCPP___RANGES_SIZE_H #define _LIBCPP___RANGES_SIZE_H +#include <__concepts/arithmetic.h> #include <__concepts/class_or_enum.h> #include <__config> #include <__iterator/concepts.h> #include <__iterator/iterator_traits.h> #include <__ranges/access.h> #include <__utility/auto_cast.h> -#include #include #include diff --git a/libcxx/include/__ranges/take_view.h b/libcxx/include/__ranges/take_view.h index 3fb9499..2c98a0b 100644 --- a/libcxx/include/__ranges/take_view.h +++ b/libcxx/include/__ranges/take_view.h @@ -11,6 +11,8 @@ #include <__algorithm/min.h> #include <__algorithm/ranges_min.h> +#include <__concepts/constructible.h> +#include <__concepts/convertible_to.h> #include <__config> #include <__functional/bind_back.h> #include <__fwd/span.h> @@ -34,7 +36,6 @@ #include <__utility/auto_cast.h> #include <__utility/forward.h> #include <__utility/move.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 9b21e7b..e278722 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -1917,6 +1917,7 @@ template #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include # include diff --git a/libcxx/include/any b/libcxx/include/any index dc26a20..763e3a1 100644 --- a/libcxx/include/any +++ b/libcxx/include/any @@ -699,6 +699,7 @@ _LIBCPP_END_NAMESPACE_STD #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include # include diff --git a/libcxx/include/array b/libcxx/include/array index af199ca..cb1a6d1 100644 --- a/libcxx/include/array +++ b/libcxx/include/array @@ -534,6 +534,7 @@ _LIBCPP_END_NAMESPACE_STD #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include #endif diff --git a/libcxx/include/bitset b/libcxx/include/bitset index 72b678b..c260f9f5 100644 --- a/libcxx/include/bitset +++ b/libcxx/include/bitset @@ -1152,4 +1152,8 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_BITSET diff --git a/libcxx/include/charconv b/libcxx/include/charconv index b8664a4..d2031ea 100644 --- a/libcxx/include/charconv +++ b/libcxx/include/charconv @@ -832,6 +832,7 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include #endif diff --git a/libcxx/include/chrono b/libcxx/include/chrono index f349190..05e4b6d 100644 --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -728,4 +728,8 @@ constexpr chrono::year operator ""y(unsigned lo # pragma GCC system_header #endif +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_CHRONO diff --git a/libcxx/include/codecvt b/libcxx/include/codecvt index a724477..c6445b1 100644 --- a/libcxx/include/codecvt +++ b/libcxx/include/codecvt @@ -553,4 +553,8 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_CODECVT diff --git a/libcxx/include/condition_variable b/libcxx/include/condition_variable index 038f0ba..6b4d506 100644 --- a/libcxx/include/condition_variable +++ b/libcxx/include/condition_variable @@ -268,4 +268,8 @@ _LIBCPP_END_NAMESPACE_STD #endif // !_LIBCPP_HAS_NO_THREADS +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_CONDITION_VARIABLE diff --git a/libcxx/include/deque b/libcxx/include/deque index b6e092b..45e1a68 100644 --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -2943,6 +2943,7 @@ _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include #endif diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map index 48186ae..3ad4b16 100644 --- a/libcxx/include/ext/hash_map +++ b/libcxx/include/ext/hash_map @@ -983,6 +983,7 @@ operator!=(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, } // namespace __gnu_cxx #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include #endif diff --git a/libcxx/include/ext/hash_set b/libcxx/include/ext/hash_set index 68b449d..dc8b786 100644 --- a/libcxx/include/ext/hash_set +++ b/libcxx/include/ext/hash_set @@ -663,6 +663,7 @@ operator!=(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x, } // namespace __gnu_cxx #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include #endif diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem index 1e7efd2..98d4bb9 100644 --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -461,4 +461,8 @@ inline constexpr bool std::ranges::enable_view +#endif + #endif // _LIBCPP_FILESYSTEM diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list index 1f817ae..4ef6f88 100644 --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -1792,6 +1792,7 @@ _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include #endif diff --git a/libcxx/include/fstream b/libcxx/include/fstream index 95f345f..1d2cb79 100644 --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -1744,4 +1744,8 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_FSTREAM diff --git a/libcxx/include/functional b/libcxx/include/functional index 4c4e02d..8589d3a 100644 --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -531,7 +531,6 @@ POLICY: For non-variadic implementations, the number of arguments is limited #include <__functional/unary_negate.h> #include <__functional/unwrap_ref.h> #include <__utility/forward.h> -#include #include #include // TODO: find out why removing this breaks the modules build #include @@ -543,6 +542,7 @@ POLICY: For non-variadic implementations, the number of arguments is limited #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include #endif diff --git a/libcxx/include/ios b/libcxx/include/ios index 6e8360f..ac4637b 100644 --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -1038,4 +1038,8 @@ defaultfloat(ios_base& __str) _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_IOS diff --git a/libcxx/include/istream b/libcxx/include/istream index 403b29c..1c9adcc 100644 --- a/libcxx/include/istream +++ b/libcxx/include/istream @@ -1637,6 +1637,10 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_iostream; _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + _LIBCPP_POP_MACROS #endif // _LIBCPP_ISTREAM diff --git a/libcxx/include/list b/libcxx/include/list index d3c47bb..de2693e 100644 --- a/libcxx/include/list +++ b/libcxx/include/list @@ -2375,6 +2375,7 @@ _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include #endif diff --git a/libcxx/include/locale b/libcxx/include/locale index c9ec7c3..fd31f0d 100644 --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -4353,6 +4353,7 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include #endif diff --git a/libcxx/include/map b/libcxx/include/map index 2d55b69d..9cf47b2 100644 --- a/libcxx/include/map +++ b/libcxx/include/map @@ -2352,6 +2352,7 @@ _LIBCPP_END_NAMESPACE_STD #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include # include diff --git a/libcxx/include/memory b/libcxx/include/memory index 8694cf6..48e808e 100644 --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -900,6 +900,7 @@ template #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include # include diff --git a/libcxx/include/mutex b/libcxx/include/mutex index d0b53ba..d11ffb2 100644 --- a/libcxx/include/mutex +++ b/libcxx/include/mutex @@ -704,6 +704,7 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include #endif diff --git a/libcxx/include/numbers b/libcxx/include/numbers index 3c8527d..1d9b6b0 100644 --- a/libcxx/include/numbers +++ b/libcxx/include/numbers @@ -59,8 +59,8 @@ namespace std::numbers { */ #include <__assert> // all public C++ headers provide the assertion handler +#include <__concepts/arithmetic.h> #include <__config> -#include #include #include @@ -131,4 +131,8 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER > 17 +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_NUMBERS diff --git a/libcxx/include/numeric b/libcxx/include/numeric index 64cd45b..2fb6f9e 100644 --- a/libcxx/include/numeric +++ b/libcxx/include/numeric @@ -172,6 +172,7 @@ template #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include #endif diff --git a/libcxx/include/queue b/libcxx/include/queue index d23f238..c58da5e 100644 --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -959,6 +959,7 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator # include #endif diff --git a/libcxx/include/random b/libcxx/include/random index ecab84a..f8077f1 100644 --- a/libcxx/include/random +++ b/libcxx/include/random @@ -1730,6 +1730,7 @@ class piecewise_linear_distribution #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include # include diff --git a/libcxx/include/regex b/libcxx/include/regex index 91a10fe..8118c944 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -6858,6 +6858,7 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include #endif diff --git a/libcxx/include/set b/libcxx/include/set index 3933ef2..1154c4e 100644 --- a/libcxx/include/set +++ b/libcxx/include/set @@ -1597,6 +1597,7 @@ _LIBCPP_END_NAMESPACE_STD #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include #endif diff --git a/libcxx/include/span b/libcxx/include/span index 337a674..8afd194 100644 --- a/libcxx/include/span +++ b/libcxx/include/span @@ -590,6 +590,7 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include #endif diff --git a/libcxx/include/stack b/libcxx/include/stack index 7b08d57..2abbcd0 100644 --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -362,6 +362,7 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> _LIBCPP_END_NAMESPACE_STD #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include #endif diff --git a/libcxx/include/string b/libcxx/include/string index 592c634..6aee5a4 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -4613,6 +4613,7 @@ _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include # include diff --git a/libcxx/include/string_view b/libcxx/include/string_view index 2c4f306..8f39cdc 100644 --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -1023,6 +1023,7 @@ _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include #endif diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index a727c36..cd0aea1 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -2646,6 +2646,7 @@ _LIBCPP_END_NAMESPACE_STD #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include #endif diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set index 4786a8a..9a25510 100644 --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -1816,6 +1816,7 @@ _LIBCPP_END_NAMESPACE_STD #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include #endif diff --git a/libcxx/include/valarray b/libcxx/include/valarray index f28e471..6c33d05 100644 --- a/libcxx/include/valarray +++ b/libcxx/include/valarray @@ -4931,6 +4931,7 @@ _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include #endif diff --git a/libcxx/include/vector b/libcxx/include/vector index b5a97c6..8f9b8fb 100644 --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -3281,6 +3281,7 @@ _LIBCPP_POP_MACROS #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include #endif diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv index a7250cf8..6e5ce44 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx03.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv @@ -335,7 +335,6 @@ filesystem version format array format bit format charconv -format concepts format cstddef format cstdint format cstdlib @@ -650,7 +649,6 @@ random type_traits random vector random version ranges compare -ranges concepts ranges cstddef ranges cstdlib ranges initializer_list diff --git a/libcxx/test/libcxx/transitive_includes/cxx11.csv b/libcxx/test/libcxx/transitive_includes/cxx11.csv index 97dff0b..837e22b 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx11.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx11.csv @@ -335,7 +335,6 @@ filesystem version format array format bit format charconv -format concepts format cstddef format cstdint format cstdlib @@ -651,7 +650,6 @@ random type_traits random vector random version ranges compare -ranges concepts ranges cstddef ranges cstdlib ranges initializer_list diff --git a/libcxx/test/libcxx/transitive_includes/cxx14.csv b/libcxx/test/libcxx/transitive_includes/cxx14.csv index e0935e8..e1cbeee 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx14.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx14.csv @@ -337,7 +337,6 @@ filesystem version format array format bit format charconv -format concepts format cstddef format cstdint format cstdlib @@ -653,7 +652,6 @@ random type_traits random vector random version ranges compare -ranges concepts ranges cstddef ranges cstdlib ranges initializer_list diff --git a/libcxx/test/libcxx/transitive_includes/cxx17.csv b/libcxx/test/libcxx/transitive_includes/cxx17.csv index e0935e8..e1cbeee 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx17.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx17.csv @@ -337,7 +337,6 @@ filesystem version format array format bit format charconv -format concepts format cstddef format cstdint format cstdlib @@ -653,7 +652,6 @@ random type_traits random vector random version ranges compare -ranges concepts ranges cstddef ranges cstdlib ranges initializer_list diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv index 4589f7b..ead6b43 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx20.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv @@ -349,7 +349,6 @@ filesystem version format array format bit format charconv -format concepts format cstddef format cstdint format cstdlib @@ -663,7 +662,6 @@ random type_traits random vector random version ranges compare -ranges concepts ranges cstddef ranges cstdlib ranges initializer_list diff --git a/libcxx/test/libcxx/transitive_includes/cxx2b.csv b/libcxx/test/libcxx/transitive_includes/cxx2b.csv index e4e82d3..d896ed6 100644 --- a/libcxx/test/libcxx/transitive_includes/cxx2b.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx2b.csv @@ -1,6 +1,5 @@ algorithm bit algorithm climits -algorithm concepts algorithm cstddef algorithm cstdint algorithm cstdlib @@ -12,7 +11,6 @@ algorithm new algorithm type_traits algorithm version any atomic -any concepts any cstddef any cstdint any cstdlib @@ -26,7 +24,6 @@ any type_traits any typeinfo any version array compare -array concepts array cstddef array cstdlib array initializer_list @@ -59,7 +56,6 @@ bit limits bit type_traits bit version bitset climits -bitset concepts bitset cstddef bitset cstdint bitset cstdlib @@ -75,7 +71,6 @@ bitset version ccomplex complex charconv cerrno charconv cmath -charconv concepts charconv cstddef charconv cstdint charconv cstdlib @@ -88,7 +83,6 @@ chrono bit chrono charconv chrono cmath chrono compare -chrono concepts chrono cstddef chrono cstdint chrono cstdlib @@ -111,7 +105,6 @@ cmath type_traits cmath version codecvt atomic codecvt cctype -codecvt concepts codecvt cstddef codecvt cstdint codecvt cstdlib @@ -142,7 +135,6 @@ concepts cstddef concepts type_traits concepts version condition_variable atomic -condition_variable concepts condition_variable cstddef condition_variable cstdint condition_variable cstdlib @@ -171,7 +163,6 @@ cwchar cwctype cwctype cctype deque atomic deque compare -deque concepts deque cstddef deque cstdint deque cstdlib @@ -248,7 +239,6 @@ experimental/vector experimental/memory_resource experimental/vector vector ext/hash_map algorithm ext/hash_map cmath -ext/hash_map concepts ext/hash_map cstddef ext/hash_map cstdint ext/hash_map cstring @@ -261,7 +251,6 @@ ext/hash_map string ext/hash_map type_traits ext/hash_set algorithm ext/hash_set cmath -ext/hash_set concepts ext/hash_set cstddef ext/hash_set cstdint ext/hash_set cstring @@ -273,7 +262,6 @@ ext/hash_set string ext/hash_set type_traits filesystem cerrno filesystem compare -filesystem concepts filesystem cstddef filesystem cstdint filesystem cstdlib @@ -292,7 +280,6 @@ filesystem version format array format bit format charconv -format concepts format cstddef format cstdint format cstdlib @@ -308,7 +295,6 @@ format type_traits format version forward_list atomic forward_list compare -forward_list concepts forward_list cstddef forward_list cstdint forward_list cstdlib @@ -324,7 +310,6 @@ forward_list typeinfo forward_list version fstream atomic fstream cctype -fstream concepts fstream cstddef fstream cstdint fstream cstdio @@ -345,7 +330,6 @@ fstream typeinfo fstream version functional array functional atomic -functional concepts functional cstddef functional cstdint functional cstdlib @@ -378,7 +362,6 @@ iomanip istream iomanip version ios atomic ios cctype -ios concepts ios cstddef ios cstdint ios cstdlib @@ -400,7 +383,6 @@ iostream istream iostream ostream iostream streambuf iostream version -istream concepts istream cstddef istream iosfwd istream ostream @@ -423,7 +405,6 @@ limits type_traits limits version list atomic list compare -list concepts list cstddef list cstdint list cstdlib @@ -439,7 +420,6 @@ list typeinfo list version locale atomic locale cctype -locale concepts locale cstddef locale cstdint locale cstdio @@ -459,7 +439,6 @@ locale type_traits locale typeinfo locale version map compare -map concepts map cstddef map cstdlib map initializer_list @@ -472,7 +451,6 @@ map type_traits map version memory atomic memory compare -memory concepts memory cstddef memory cstdint memory cstdlib @@ -495,7 +473,6 @@ memory_resource stdexcept memory_resource tuple memory_resource version mutex atomic -mutex concepts mutex cstddef mutex cstdint mutex cstdlib @@ -516,11 +493,9 @@ new cstdlib new exception new type_traits new version -numbers concepts numbers type_traits numbers version numeric cmath -numeric concepts numeric cstddef numeric limits numeric type_traits @@ -547,7 +522,6 @@ ostream streambuf ostream type_traits ostream version queue compare -queue concepts queue cstddef queue cstdlib queue deque @@ -559,7 +533,6 @@ queue version random bit random climits random cmath -random concepts random cstddef random cstdint random cstdlib @@ -572,7 +545,6 @@ random type_traits random vector random version ranges compare -ranges concepts ranges cstddef ranges cstdlib ranges initializer_list @@ -593,7 +565,6 @@ ratio version regex atomic regex cctype regex compare -regex concepts regex cstddef regex cstdint regex cstdlib @@ -624,7 +595,6 @@ semaphore ratio semaphore type_traits semaphore version set compare -set concepts set cstddef set cstdlib set initializer_list @@ -643,7 +613,6 @@ shared_mutex system_error shared_mutex type_traits shared_mutex version span array -span concepts span cstddef span initializer_list span limits @@ -656,7 +625,6 @@ sstream string sstream type_traits sstream version stack compare -stack concepts stack cstddef stack deque stack initializer_list @@ -671,7 +639,6 @@ streambuf iosfwd streambuf version string climits string compare -string concepts string cstddef string cstdint string cstdio @@ -688,7 +655,6 @@ string tuple string type_traits string version string_view compare -string_view concepts string_view cstddef string_view cstdint string_view cstdio @@ -744,7 +710,6 @@ typeinfo exception typeinfo type_traits unordered_map cmath unordered_map compare -unordered_map concepts unordered_map cstddef unordered_map cstdint unordered_map cstdlib @@ -759,7 +724,6 @@ unordered_map type_traits unordered_map version unordered_set cmath unordered_set compare -unordered_set concepts unordered_set cstddef unordered_set cstdint unordered_set cstdlib @@ -780,7 +744,6 @@ utility limits utility type_traits utility version valarray cmath -valarray concepts valarray cstddef valarray cstdlib valarray cstring @@ -804,7 +767,6 @@ variant version vector atomic vector climits vector compare -vector concepts vector cstddef vector cstdint vector cstdlib diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/ranges.clamp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/ranges.clamp.pass.cpp index 553ffb9..9da52e2 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/ranges.clamp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/ranges.clamp.pass.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include -- 2.7.4