diff --git a/libcxx/include/__algorithm/rotate.h b/libcxx/include/__algorithm/rotate.h --- a/libcxx/include/__algorithm/rotate.h +++ b/libcxx/include/__algorithm/rotate.h @@ -16,6 +16,7 @@ #include <__iterator/iterator_traits.h> #include <__iterator/next.h> #include <__iterator/prev.h> +#include <__utility/move.h> #include <__utility/swap.h> #include diff --git a/libcxx/include/__format/formatter.h b/libcxx/include/__format/formatter.h --- a/libcxx/include/__format/formatter.h +++ b/libcxx/include/__format/formatter.h @@ -20,6 +20,7 @@ #include <__format/format_fwd.h> #include <__format/format_string.h> #include <__format/parser_std_format_spec.h> +#include <__utility/move.h> #include <__utility/unreachable.h> #include diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -22,6 +22,7 @@ #include <__memory/shared_ptr.h> #include <__utility/forward.h> #include <__utility/move.h> +#include <__utility/swap.h> #include #include // TODO: replace with <__memory/__builtin_new_allocator.h> #include diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -17,12 +17,14 @@ #include <__config> #include <__debug> #include <__functional/hash.h> +#include <__utility/swap.h> #include #include #include #include #include -#include + +#include // TODO: Remove this #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__locale b/libcxx/include/__locale --- a/libcxx/include/__locale +++ b/libcxx/include/__locale @@ -18,7 +18,8 @@ #include #include #include -#include + +#include // TODO: Remove this #if defined(_LIBCPP_MSVCRT_LIKE) # include 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 @@ -24,6 +24,7 @@ #include <__memory/unique_ptr.h> #include <__utility/forward.h> #include <__utility/move.h> +#include <__utility/swap.h> #include #include // abort #include diff --git a/libcxx/include/__tree b/libcxx/include/__tree --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -13,6 +13,7 @@ #include <__algorithm/min.h> #include <__config> #include <__utility/forward.h> +#include <__utility/swap.h> #include #include #include diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -692,9 +692,10 @@ #include #include #include -#include #include +#include // TODO: Remove this + #include <__algorithm/adjacent_find.h> #include <__algorithm/all_of.h> #include <__algorithm/any_of.h> diff --git a/libcxx/include/any b/libcxx/include/any --- a/libcxx/include/any +++ b/libcxx/include/any @@ -83,6 +83,8 @@ #include <__availability> #include <__config> #include <__utility/forward.h> +#include <__utility/in_place.h> +#include <__utility/move.h> #include #include #include diff --git a/libcxx/include/array b/libcxx/include/array --- a/libcxx/include/array +++ b/libcxx/include/array @@ -115,13 +115,16 @@ #include <__assert> #include <__config> #include <__tuple> +#include <__utility/integer_sequence.h> +#include <__utility/move.h> #include <__utility/unreachable.h> #include #include #include -#include #include +#include // TODO: Remove this + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -174,6 +174,8 @@ #include <__iterator/iterator_traits.h> #include <__split_buffer> #include <__utility/forward.h> +#include <__utility/move.h> +#include <__utility/swap.h> #include #include #include diff --git a/libcxx/include/experimental/memory_resource b/libcxx/include/experimental/memory_resource --- a/libcxx/include/experimental/memory_resource +++ b/libcxx/include/experimental/memory_resource @@ -66,6 +66,7 @@ #include <__assert> #include <__tuple> +#include <__utility/move.h> #include #include #include @@ -75,7 +76,8 @@ #include #include #include -#include + +#include // TODO: Remove this #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/experimental/propagate_const b/libcxx/include/experimental/propagate_const --- a/libcxx/include/experimental/propagate_const +++ b/libcxx/include/experimental/propagate_const @@ -106,10 +106,13 @@ */ +#include <__utility/move.h> +#include <__utility/swap.h> #include #include #include -#include + +#include // TODO: Remove this #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/fstream b/libcxx/include/fstream --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -184,9 +184,12 @@ #include <__availability> #include <__config> #include <__locale> +#include <__utility/move.h> +#include <__utility/swap.h> #include <__utility/unreachable.h> #include #include +#include #include #include #include diff --git a/libcxx/include/functional b/libcxx/include/functional --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -525,9 +525,10 @@ #include #include #include -#include #include +#include // TODO: Remove this + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/future b/libcxx/include/future --- a/libcxx/include/future +++ b/libcxx/include/future @@ -370,6 +370,7 @@ #include <__memory/uses_allocator.h> #include <__utility/auto_cast.h> #include <__utility/forward.h> +#include <__utility/move.h> #include #include #include diff --git a/libcxx/include/ios b/libcxx/include/ios --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -213,6 +213,7 @@ #include <__config> #include <__ios/fpos.h> #include <__locale> +#include <__utility/swap.h> #include #include #include diff --git a/libcxx/include/iterator b/libcxx/include/iterator --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -654,9 +654,10 @@ #include #include #include -#include #include +#include // TODO: Remove this + // TODO: remove these headers #include <__functional/binary_function.h> #include <__functional/invoke.h> diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -188,6 +188,8 @@ #include <__config> #include <__debug> #include <__utility/forward.h> +#include <__utility/move.h> +#include <__utility/swap.h> #include #include #include diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -537,15 +537,17 @@ #include <__node_handle> #include <__tree> #include <__utility/forward.h> +#include <__utility/swap.h> #include #include #include #include // __libcpp_erase_if_container #include #include -#include #include +#include // TODO: Remove this + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/memory b/libcxx/include/memory --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -833,7 +833,6 @@ #include #include #include -#include #include // TODO: remove these headers diff --git a/libcxx/include/optional b/libcxx/include/optional --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -162,15 +162,18 @@ #include <__availability> #include <__concepts/invocable.h> #include <__config> +#include <__utility/in_place.h> +#include <__utility/swap.h> #include #include #include #include #include #include -#include #include +#include // TODO: Remove this + // TODO: remove these headers #include <__memory/allocator_arg_t.h> #include <__memory/uses_allocator.h> diff --git a/libcxx/include/regex b/libcxx/include/regex --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -767,6 +767,8 @@ #include <__config> #include <__iterator/wrap_iter.h> #include <__locale> +#include <__utility/move.h> +#include <__utility/swap.h> #include #include #include @@ -774,10 +776,11 @@ #include #include #include -#include #include #include +#include // TODO: Remove this + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/sstream b/libcxx/include/sstream --- a/libcxx/include/sstream +++ b/libcxx/include/sstream @@ -181,6 +181,7 @@ */ #include <__config> +#include <__utility/swap.h> #include #include #include diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -527,6 +527,9 @@ #include <__debug> #include <__ios/fpos.h> #include <__iterator/wrap_iter.h> +#include <__utility/auto_cast.h> +#include <__utility/move.h> +#include <__utility/swap.h> #include #include // EOF #include @@ -538,9 +541,10 @@ #include #include #include -#include #include +#include // TODO: Remove this + // TODO: remove these headers #include <__functional/binary_function.h> #include <__functional/invoke.h> diff --git a/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -175,10 +175,12 @@ #include <__utility/forward.h> #include <__utility/integer_sequence.h> #include <__utility/move.h> +#include <__utility/pair.h> +#include <__utility/piecewise_construct.h> +#include <__utility/swap.h> #include #include #include -#include #include // TODO: remove these headers diff --git a/libcxx/include/typeindex b/libcxx/include/typeindex --- a/libcxx/include/typeindex +++ b/libcxx/include/typeindex @@ -59,7 +59,6 @@ #include <__memory/allocator_arg_t.h> #include <__memory/uses_allocator.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/variant b/libcxx/include/variant --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -206,6 +206,9 @@ #include <__functional/unary_function.h> #include <__tuple> #include <__utility/forward.h> +#include <__utility/in_place.h> +#include <__utility/move.h> +#include <__utility/swap.h> #include <__variant/monostate.h> #include #include @@ -214,9 +217,10 @@ #include #include #include -#include #include +#include // TODO: Remove this + // TODO: remove these headers #include <__functional/binary_function.h> #include <__functional/invoke.h> diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -288,6 +288,8 @@ #include <__iterator/wrap_iter.h> #include <__split_buffer> #include <__utility/forward.h> +#include <__utility/move.h> +#include <__utility/swap.h> #include #include #include @@ -300,6 +302,8 @@ #include #include +#include // TODO: Remove this + // TODO: remove these headers #include <__functional/binary_function.h> #include <__functional/invoke.h> @@ -308,7 +312,6 @@ #include <__functional/unary_function.h> #include <__functional/weak_result_type.h> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/test/libcxx/ranges/range.access/end.incomplete_type.pass.cpp b/libcxx/test/libcxx/ranges/range.access/end.incomplete_type.pass.cpp --- a/libcxx/test/libcxx/ranges/range.access/end.incomplete_type.pass.cpp +++ b/libcxx/test/libcxx/ranges/range.access/end.incomplete_type.pass.cpp @@ -12,9 +12,10 @@ // Test the libc++-specific behavior that we handle the IFNDR case for ranges::end // by being SFINAE-friendly. -#include #include +#include #include +#include struct Incomplete; diff --git a/libcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp @@ -13,9 +13,10 @@ // template // drop_view(R&&, range_difference_t) -> drop_view>; -#include #include #include +#include +#include struct View : std::ranges::view_base { int *begin() const; diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.compile.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.compile.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.compile.pass.cpp @@ -14,6 +14,7 @@ // explicit join_view(R&&) -> join_view>; #include +#include struct Child { int *begin() const; diff --git a/libcxx/test/std/ranges/range.adaptors/range.take/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/ctad.compile.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.take/ctad.compile.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.take/ctad.compile.pass.cpp @@ -13,9 +13,10 @@ // template // take_view(R&&, range_difference_t) -> take_view>; -#include #include #include +#include +#include struct View : std::ranges::view_base { int *begin() const; diff --git a/libcxx/test/std/ranges/range.adaptors/range.transform/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/ctad.compile.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.transform/ctad.compile.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.transform/ctad.compile.pass.cpp @@ -13,9 +13,10 @@ // template // transform_view(R&&, F) -> transform_view, F>; -#include #include #include +#include +#include struct PlusOne { int operator()(int x) const; diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/begin.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/begin.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.iota.view/begin.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.iota.view/begin.pass.cpp @@ -12,8 +12,9 @@ // constexpr iterator begin() const; -#include #include +#include +#include #include "test_macros.h" #include "types.h" diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp @@ -21,8 +21,9 @@ // constexpr auto end() const; // constexpr iterator end() const requires same_as; -#include #include +#include +#include #include "types.h" diff --git a/libcxx/test/std/ranges/range.factories/range.single.view/assign.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/assign.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.single.view/assign.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.single.view/assign.pass.cpp @@ -13,8 +13,9 @@ // Tests that is a . -#include #include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/std/ranges/range.factories/range.single.view/ctor.in_place.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/ctor.in_place.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.single.view/ctor.in_place.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.single.view/ctor.in_place.pass.cpp @@ -14,8 +14,9 @@ // requires constructible_from // constexpr explicit single_view(in_place_t, Args&&... args); -#include #include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/std/ranges/range.factories/range.single.view/ctor.value.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/ctor.value.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.single.view/ctor.value.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.single.view/ctor.value.pass.cpp @@ -13,8 +13,9 @@ // constexpr explicit single_view(const T& t); // constexpr explicit single_view(T&& t); -#include #include +#include +#include #include "test_macros.h" diff --git a/libcxx/test/std/ranges/range.utility/range.subrange/structured_bindings.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/structured_bindings.pass.cpp --- a/libcxx/test/std/ranges/range.utility/range.subrange/structured_bindings.pass.cpp +++ b/libcxx/test/std/ranges/range.utility/range.subrange/structured_bindings.pass.cpp @@ -12,9 +12,10 @@ // class std::ranges::subrange; +#include #include +#include -#include #include "test_macros.h" constexpr void test_sized_subrange() diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/optional_U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/optional_U.pass.cpp --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/optional_U.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/optional_U.pass.cpp @@ -12,10 +12,11 @@ // template // optional(optional&& rhs); +#include +#include #include #include -#include -#include +#include #include "test_macros.h" diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp @@ -16,8 +16,7 @@ // template struct tuple_element; #include -// Note: make sure to not include `` (or any other header including ``) because it also makes some -// tuple specializations available, thus obscuring whether the `` includes work correctly. +#include using Iterator = int*;