diff --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h --- a/libcxx/include/__algorithm/sort.h +++ b/libcxx/include/__algorithm/sort.h @@ -15,6 +15,7 @@ #include <__algorithm/partial_sort.h> #include <__algorithm/unwrap_iter.h> #include <__config> +#include <__functional/operations.h> #include <__utility/swap.h> #include diff --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h --- a/libcxx/include/__format/format_arg.h +++ b/libcxx/include/__format/format_arg.h @@ -16,7 +16,9 @@ #include <__format/format_error.h> #include <__format/format_fwd.h> #include <__format/format_parse_context.h> +#include <__functional/invoke.h> #include <__memory/addressof.h> +#include <__utility/forward.h> #include <__utility/unreachable.h> #include <__variant/monostate.h> #include diff --git a/libcxx/include/experimental/coroutine b/libcxx/include/experimental/coroutine --- a/libcxx/include/experimental/coroutine +++ b/libcxx/include/experimental/coroutine @@ -47,6 +47,7 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__functional/hash.h> +#include <__functional/operations.h> #include #include #include // for hash diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map --- a/libcxx/include/ext/hash_map +++ b/libcxx/include/ext/hash_map @@ -206,6 +206,7 @@ #include <__hash_table> #include #include +#include #include #include diff --git a/libcxx/include/ext/hash_set b/libcxx/include/ext/hash_set --- a/libcxx/include/ext/hash_set +++ b/libcxx/include/ext/hash_set @@ -197,6 +197,7 @@ #include <__hash_table> #include #include +#include #if defined(__DEPRECATED) && __DEPRECATED #if defined(_LIBCPP_WARNING) diff --git a/libcxx/include/iterator b/libcxx/include/iterator --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -684,12 +684,6 @@ #include // TODO: remove these headers -#include <__functional/binary_function.h> -#include <__functional/invoke.h> -#include <__functional/operations.h> -#include <__functional/reference_wrapper.h> -#include <__functional/unary_function.h> -#include <__functional/weak_result_type.h> #include <__memory/allocator_arg_t.h> #include <__memory/uses_allocator.h> #include diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -532,7 +532,9 @@ #include <__algorithm/lexicographical_compare.h> #include <__assert> // all public C++ headers provide the assertion handler #include <__config> +#include <__functional/binary_function.h> #include <__functional/is_transparent.h> +#include <__functional/operations.h> #include <__iterator/iterator_traits.h> #include <__node_handle> #include <__tree> diff --git a/libcxx/include/memory b/libcxx/include/memory --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -872,14 +872,6 @@ #include #include -// TODO: remove these headers -#include <__functional/binary_function.h> -#include <__functional/invoke.h> -#include <__functional/operations.h> -#include <__functional/reference_wrapper.h> -#include <__functional/unary_function.h> -#include <__functional/weak_result_type.h> - #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) # include <__memory/auto_ptr.h> #endif diff --git a/libcxx/include/queue b/libcxx/include/queue --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -222,6 +222,7 @@ #include <__algorithm/push_heap.h> #include <__assert> // all public C++ headers provide the assertion handler #include <__config> +#include <__functional/operations.h> #include <__iterator/iterator_traits.h> #include <__memory/uses_allocator.h> #include <__utility/forward.h> diff --git a/libcxx/include/set b/libcxx/include/set --- a/libcxx/include/set +++ b/libcxx/include/set @@ -476,6 +476,7 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> #include <__functional/is_transparent.h> +#include <__functional/operations.h> #include <__iterator/iterator_traits.h> #include <__node_handle> #include <__tree> diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -524,6 +524,7 @@ #include <__config> #include <__debug> #include <__format/enable_insertable.h> +#include <__functional/unary_function.h> #include <__ios/fpos.h> #include <__iterator/wrap_iter.h> #include <__memory/allocate_at_least.h> @@ -547,12 +548,6 @@ #include // TODO: remove these headers -#include <__functional/binary_function.h> -#include <__functional/invoke.h> -#include <__functional/operations.h> -#include <__functional/reference_wrapper.h> -#include <__functional/unary_function.h> -#include <__functional/weak_result_type.h> #include #include diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -199,6 +199,7 @@ #include <__algorithm/min.h> #include <__assert> // all public C++ headers provide the assertion handler #include <__config> +#include <__functional/unary_function.h> #include <__fwd/string_view.h> #include <__ranges/concepts.h> #include <__ranges/data.h> diff --git a/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -185,12 +185,6 @@ #include // TODO: remove these headers -#include <__functional/binary_function.h> -#include <__functional/invoke.h> -#include <__functional/operations.h> -#include <__functional/reference_wrapper.h> -#include <__functional/unary_function.h> -#include <__functional/weak_result_type.h> #include #include #include diff --git a/libcxx/include/typeindex b/libcxx/include/typeindex --- a/libcxx/include/typeindex +++ b/libcxx/include/typeindex @@ -52,11 +52,6 @@ #include // TODO: remove these headers -#include <__functional/binary_function.h> -#include <__functional/invoke.h> -#include <__functional/operations.h> -#include <__functional/reference_wrapper.h> -#include <__functional/weak_result_type.h> #include <__memory/allocator_arg_t.h> #include <__memory/uses_allocator.h> #include diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -519,6 +519,7 @@ #include <__config> #include <__debug> #include <__functional/is_transparent.h> +#include <__functional/operations.h> #include <__hash_table> #include <__iterator/iterator_traits.h> #include <__memory/addressof.h> diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -464,6 +464,7 @@ #include <__config> #include <__debug> #include <__functional/is_transparent.h> +#include <__functional/operations.h> #include <__hash_table> #include <__memory/addressof.h> #include <__node_handle> diff --git a/libcxx/include/variant b/libcxx/include/variant --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -221,10 +221,6 @@ #include // TODO: remove these headers -#include <__functional/binary_function.h> -#include <__functional/invoke.h> -#include <__functional/reference_wrapper.h> -#include <__functional/weak_result_type.h> #include <__memory/allocator_arg_t.h> #include <__memory/uses_allocator.h> #include diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -285,6 +285,7 @@ #include <__debug> #include <__format/enable_insertable.h> #include <__functional/hash.h> +#include <__functional/unary_function.h> #include <__iterator/iterator_traits.h> #include <__iterator/wrap_iter.h> #include <__memory/allocate_at_least.h> @@ -305,12 +306,6 @@ #include // TODO: remove these headers -#include <__functional/binary_function.h> -#include <__functional/invoke.h> -#include <__functional/operations.h> -#include <__functional/reference_wrapper.h> -#include <__functional/unary_function.h> -#include <__functional/weak_result_type.h> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp --- a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp +++ b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp @@ -17,8 +17,9 @@ // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG=1 #include -#include #include +#include +#include #include "test_macros.h" #include "check_assertion.h" diff --git a/libcxx/test/libcxx/algorithms/sort_stability.pass.cpp b/libcxx/test/libcxx/algorithms/sort_stability.pass.cpp --- a/libcxx/test/libcxx/algorithms/sort_stability.pass.cpp +++ b/libcxx/test/libcxx/algorithms/sort_stability.pass.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp @@ -16,6 +16,7 @@ #include #include +#include #include "test_macros.h" #include "test_iterators.h" diff --git a/libcxx/test/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp b/libcxx/test/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp --- a/libcxx/test/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp +++ b/libcxx/test/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp b/libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp --- a/libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp +++ b/libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include "test_macros.h" #include "min_allocator.h" diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp @@ -11,9 +11,10 @@ // template void unique(BinaryPredicate binary_pred); // C++17 and before // template size_type unique(BinaryPredicate binary_pred); // C++20 and after +#include #include +#include #include -#include #include "test_macros.h" #include "min_allocator.h" diff --git a/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp @@ -13,6 +13,7 @@ #include #include +#include #include "test_macros.h" #include "min_allocator.h" diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp --- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "test_macros.h" diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp @@ -22,6 +22,7 @@ // typedef value_type&& reference; // }; +#include #include #include diff --git a/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp @@ -16,6 +16,7 @@ #include #include +#include #include "test_macros.h" #include "test_iterators.h" diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/eq.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/eq.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/eq.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/eq.pass.cpp @@ -15,6 +15,7 @@ #include #include +#include #include #include "../types.h" diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/types.h b/libcxx/test/std/ranges/range.adaptors/range.zip/types.h --- a/libcxx/test/std/ranges/range.adaptors/range.zip/types.h +++ b/libcxx/test/std/ranges/range.adaptors/range.zip/types.h @@ -9,6 +9,7 @@ #ifndef TEST_STD_RANGES_RANGE_ADAPTORS_RANGE_ZIP_TYPES_H #define TEST_STD_RANGES_RANGE_ADAPTORS_RANGE_ZIP_TYPES_H +#include #include #include "test_macros.h" diff --git a/libcxx/test/support/deduction_guides_sfinae_checks.h b/libcxx/test/support/deduction_guides_sfinae_checks.h --- a/libcxx/test/support/deduction_guides_sfinae_checks.h +++ b/libcxx/test/support/deduction_guides_sfinae_checks.h @@ -9,6 +9,7 @@ #ifndef TEST_SUPPORT_DEDUCTION_GUIDES_SFINAE_CHECKS_H #define TEST_SUPPORT_DEDUCTION_GUIDES_SFINAE_CHECKS_H +#include #include #include #include