diff options
author | Nikolas Klauser <nikolasklauser@berlin.de> | 2022-03-05 21:17:07 +0300 |
---|---|---|
committer | Nikolas Klauser <nikolasklauser@berlin.de> | 2022-03-05 21:31:46 +0300 |
commit | 52915d78f44bfc5add6cddc91d392fa343672897 (patch) | |
tree | 89216ac1d34ddb1bd2b487c13cea8ed559ea3d66 /libcxx | |
parent | 14af99d375b6c47e4b5ec457fb1f1f02b71a8566 (diff) |
[libc++] Granularize <utility> includes
Reviewed By: ldionne, #libc
Spies: EricWF, libcxx-commits, arphaman
Differential Revision: https://reviews.llvm.org/D120466
Diffstat (limited to 'libcxx')
41 files changed, 97 insertions, 29 deletions
diff --git a/libcxx/include/__algorithm/rotate.h b/libcxx/include/__algorithm/rotate.h index 344c2f8cc9ff..ec7b999c5b1a 100644 --- 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 <iterator> diff --git a/libcxx/include/__format/formatter.h b/libcxx/include/__format/formatter.h index f9e0b6c84b7b..44769c5faadb 100644 --- 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 <string_view> diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h index 4698c8c2d42e..5e734d0af350 100644 --- 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 <exception> #include <memory> // TODO: replace with <__memory/__builtin_new_allocator.h> #include <type_traits> diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table index 5de00a3abcb5..eae111bf6043 100644 --- 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 <cmath> #include <initializer_list> #include <iterator> #include <memory> #include <type_traits> -#include <utility> + +#include <utility> // 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 index e1781986fd35..a31112d3da29 100644 --- a/libcxx/include/__locale +++ b/libcxx/include/__locale @@ -18,7 +18,8 @@ #include <memory> #include <mutex> #include <string> -#include <utility> + +#include <utility> // TODO: Remove this #if defined(_LIBCPP_MSVCRT_LIKE) # include <__support/win32/locale_win32.h> diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h index 0f28bcdfac11..7401d3a891c1 100644 --- 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 <cstddef> #include <cstdlib> // abort #include <iosfwd> diff --git a/libcxx/include/__tree b/libcxx/include/__tree index 384d3835049b..f8d2226e66fb 100644 --- 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 <iterator> #include <limits> #include <memory> diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 06314bdc66fb..8bff2069c430 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -692,9 +692,10 @@ template <class BidirectionalIterator, class Compare> #include <iterator> #include <memory> #include <type_traits> -#include <utility> #include <version> +#include <utility> // 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 index 2a85a66c2959..7dc50b78df8c 100644 --- a/libcxx/include/any +++ b/libcxx/include/any @@ -83,6 +83,8 @@ namespace std { #include <__availability> #include <__config> #include <__utility/forward.h> +#include <__utility/in_place.h> +#include <__utility/move.h> #include <cstdlib> #include <memory> #include <type_traits> diff --git a/libcxx/include/array b/libcxx/include/array index 314d24935a43..ce419210667d 100644 --- a/libcxx/include/array +++ b/libcxx/include/array @@ -115,13 +115,16 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce #include <__assert> #include <__config> #include <__tuple> +#include <__utility/integer_sequence.h> +#include <__utility/move.h> #include <__utility/unreachable.h> #include <iterator> #include <stdexcept> #include <type_traits> -#include <utility> #include <version> +#include <utility> // 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 index a6f2a676f3b4..537a8ddcb5ea 100644 --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -174,6 +174,8 @@ template <class T, class Allocator, class Predicate> #include <__iterator/iterator_traits.h> #include <__split_buffer> #include <__utility/forward.h> +#include <__utility/move.h> +#include <__utility/swap.h> #include <compare> #include <initializer_list> #include <iterator> diff --git a/libcxx/include/experimental/memory_resource b/libcxx/include/experimental/memory_resource index 098e25f1261f..359ac70be014 100644 --- a/libcxx/include/experimental/memory_resource +++ b/libcxx/include/experimental/memory_resource @@ -66,6 +66,7 @@ namespace pmr { #include <__assert> #include <__tuple> +#include <__utility/move.h> #include <cstddef> #include <cstdlib> #include <experimental/__config> @@ -75,7 +76,8 @@ namespace pmr { #include <new> #include <stdexcept> #include <type_traits> -#include <utility> + +#include <utility> // 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 index c2774b19d3b0..b6c3827871ae 100644 --- 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 <experimental/__config> #include <functional> #include <type_traits> -#include <utility> + +#include <utility> // 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 index 80bda63755c6..2f1cd32b35fb 100644 --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -184,9 +184,12 @@ typedef basic_fstream<wchar_t> wfstream; #include <__availability> #include <__config> #include <__locale> +#include <__utility/move.h> +#include <__utility/swap.h> #include <__utility/unreachable.h> #include <cstdio> #include <cstdlib> +#include <cstring> #include <istream> #include <ostream> #include <version> diff --git a/libcxx/include/functional b/libcxx/include/functional index d4889294f7c9..09f6ec52235a 100644 --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -525,9 +525,10 @@ POLICY: For non-variadic implementations, the number of arguments is limited #include <tuple> #include <type_traits> #include <typeinfo> -#include <utility> #include <version> +#include <utility> // 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 index a4c8ccc6d61e..162d40013602 100644 --- a/libcxx/include/future +++ b/libcxx/include/future @@ -370,6 +370,7 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>; #include <__memory/uses_allocator.h> #include <__utility/auto_cast.h> #include <__utility/forward.h> +#include <__utility/move.h> #include <exception> #include <memory> #include <mutex> diff --git a/libcxx/include/ios b/libcxx/include/ios index 874227ac73ef..15053e524682 100644 --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -213,6 +213,7 @@ storage-class-specifier const error_category& iostream_category() noexcept; #include <__config> #include <__ios/fpos.h> #include <__locale> +#include <__utility/swap.h> #include <iosfwd> #include <system_error> #include <version> diff --git a/libcxx/include/iterator b/libcxx/include/iterator index 6e2eb4a78c28..312939599d29 100644 --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -654,9 +654,10 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept; #include <cstddef> #include <initializer_list> #include <type_traits> -#include <utility> #include <version> +#include <utility> // 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 index ac2e466e95c2..5f32b13608f5 100644 --- a/libcxx/include/list +++ b/libcxx/include/list @@ -188,6 +188,8 @@ template <class T, class Allocator, class Predicate> #include <__config> #include <__debug> #include <__utility/forward.h> +#include <__utility/move.h> +#include <__utility/swap.h> #include <initializer_list> #include <iterator> #include <limits> diff --git a/libcxx/include/map b/libcxx/include/map index 551edc58cc22..4aae8dbc1b4b 100644 --- a/libcxx/include/map +++ b/libcxx/include/map @@ -537,15 +537,17 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); // C++20 #include <__node_handle> #include <__tree> #include <__utility/forward.h> +#include <__utility/swap.h> #include <compare> #include <functional> #include <initializer_list> #include <iterator> // __libcpp_erase_if_container #include <memory> #include <type_traits> -#include <utility> #include <version> +#include <utility> // 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 index 3bc31d29ed6c..1fccdacdcf86 100644 --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -833,9 +833,10 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space); #include <tuple> #include <type_traits> #include <typeinfo> -#include <utility> #include <version> +#include <utility> // TODO: Remove this + // TODO: remove these headers #include <__functional/binary_function.h> #include <__functional/invoke.h> diff --git a/libcxx/include/optional b/libcxx/include/optional index b20081d0e1b9..effee3018ab3 100644 --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -162,15 +162,18 @@ template<class T> #include <__availability> #include <__concepts/invocable.h> #include <__config> +#include <__utility/in_place.h> +#include <__utility/swap.h> #include <compare> #include <functional> #include <initializer_list> #include <new> #include <stdexcept> #include <type_traits> -#include <utility> #include <version> +#include <utility> // 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 index 68922f66e4c2..944fa4a90093 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -767,6 +767,8 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator; #include <__config> #include <__iterator/wrap_iter.h> #include <__locale> +#include <__utility/move.h> +#include <__utility/swap.h> #include <compare> #include <deque> #include <initializer_list> @@ -774,10 +776,11 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator; #include <memory> #include <stdexcept> #include <string> -#include <utility> #include <vector> #include <version> +#include <utility> // 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 index dd1d9c3d0c1a..ba6148be8bd5 100644 --- a/libcxx/include/sstream +++ b/libcxx/include/sstream @@ -181,6 +181,7 @@ typedef basic_stringstream<wchar_t> wstringstream; */ #include <__config> +#include <__utility/swap.h> #include <istream> #include <ostream> #include <string> diff --git a/libcxx/include/string b/libcxx/include/string index 39647ff79db3..7eadde7e1977 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -527,6 +527,9 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++1 #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 <compare> #include <cstdio> // EOF #include <cstdlib> @@ -538,9 +541,10 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++1 #include <stdexcept> #include <string_view> #include <type_traits> -#include <utility> #include <version> +#include <utility> // 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 index 08ded9c916eb..da5b8d403386 100644 --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -175,12 +175,16 @@ template <class... Types> #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 <compare> #include <cstddef> #include <type_traits> -#include <utility> #include <version> +#include <utility> // TODO: Remove this + // TODO: remove these headers #include <__functional/binary_function.h> #include <__functional/invoke.h> diff --git a/libcxx/include/typeindex b/libcxx/include/typeindex index b5dcd8496ae0..592da67b1b82 100644 --- a/libcxx/include/typeindex +++ b/libcxx/include/typeindex @@ -50,6 +50,8 @@ struct hash<type_index> #include <typeinfo> #include <version> +#include <utility> // TODO: Remove this + // TODO: remove these headers #include <__functional/binary_function.h> #include <__functional/invoke.h> @@ -59,7 +61,6 @@ struct hash<type_index> #include <__memory/allocator_arg_t.h> #include <__memory/uses_allocator.h> #include <new> -#include <utility> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/variant b/libcxx/include/variant index d102196f60a2..6128f2b5e249 100644 --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -206,6 +206,9 @@ namespace std { #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 <compare> #include <exception> @@ -214,9 +217,10 @@ namespace std { #include <new> #include <tuple> #include <type_traits> -#include <utility> #include <version> +#include <utility> // 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 index 57d35064508e..2170ae6a2117 100644 --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -288,6 +288,8 @@ erase_if(vector<T, Allocator>& c, Predicate pred); // C++20 #include <__iterator/wrap_iter.h> #include <__split_buffer> #include <__utility/forward.h> +#include <__utility/move.h> +#include <__utility/swap.h> #include <climits> #include <compare> #include <cstdlib> @@ -300,6 +302,8 @@ erase_if(vector<T, Allocator>& c, Predicate pred); // C++20 #include <type_traits> #include <version> +#include <utility> // TODO: Remove this + // TODO: remove these headers #include <__functional/binary_function.h> #include <__functional/invoke.h> @@ -308,7 +312,6 @@ erase_if(vector<T, Allocator>& c, Predicate pred); // C++20 #include <__functional/unary_function.h> #include <__functional/weak_result_type.h> #include <typeinfo> -#include <utility> #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 index c038fa78aa4e..8deaff34977e 100644 --- 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 <ranges> #include <cassert> +#include <ranges> #include <type_traits> +#include <utility> 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 index 98e9887fa73d..c657738388f4 100644 --- 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<class R> // drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>; -#include <ranges> #include <cassert> #include <concepts> +#include <ranges> +#include <utility> 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 index f0dd9abc3372..8edd40cc2246 100644 --- 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<views::all_t<R>>; #include <ranges> +#include <utility> 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 index 419fad396caa..f765502d4ebb 100644 --- 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<class R> // take_view(R&&, range_difference_t<R>) -> take_view<views::all_t<R>>; -#include <ranges> #include <cassert> #include <concepts> +#include <ranges> +#include <utility> 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 index 086dc2fb471a..8f4a9db143e8 100644 --- 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<class R, class F> // transform_view(R&&, F) -> transform_view<views::all_t<R>, F>; -#include <ranges> #include <cassert> #include <concepts> +#include <ranges> +#include <utility> 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 index 16b80b19ef3b..e5f31b223a9d 100644 --- 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 <ranges> #include <cassert> +#include <ranges> +#include <utility> #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 index dfbc588b2e0c..8d32450026d8 100644 --- 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<W, Bound>; -#include <ranges> #include <cassert> +#include <ranges> +#include <utility> #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 index a94989dda424..1f855bbceec6 100644 --- 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 <value_> is a <copyable-box>. -#include <ranges> #include <cassert> +#include <ranges> +#include <utility> #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 index e2627c1a8682..e0f7371cf8c1 100644 --- 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<T, Args...> // constexpr explicit single_view(in_place_t, Args&&... args); -#include <ranges> #include <cassert> +#include <ranges> +#include <utility> #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 index da4e86b8c12f..0a0800265e8b 100644 --- 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 <ranges> #include <cassert> +#include <ranges> +#include <utility> #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 index ed2a166b93ec..b22d9b22a52b 100644 --- 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 <cassert> #include <ranges> +#include <utility> -#include <cassert> #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 index 2354bb51560e..14c400cdd152 100644 --- 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 <class U> // optional(optional<U>&& rhs); +#include <cassert> +#include <memory> #include <optional> #include <type_traits> -#include <memory> -#include <cassert> +#include <utility> #include "test_macros.h" |