diff --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference --- a/libcxx/include/__bit_reference +++ b/libcxx/include/__bit_reference @@ -10,9 +10,11 @@ #ifndef _LIBCPP___BIT_REFERENCE #define _LIBCPP___BIT_REFERENCE +#include <__algorithm/min.h> #include <__bits> #include <__config> -#include +#include <__memory/pointer_traits.h> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header 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 @@ -12,6 +12,7 @@ #include <__algorithm/copy.h> #include <__algorithm/fill_n.h> +#include <__algorithm/transform.h> #include <__availability> #include <__config> #include <__format/format_error.h> diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -10,10 +10,11 @@ #ifndef _LIBCPP__HASH_TABLE #define _LIBCPP__HASH_TABLE +#include <__algorithm/max.h> +#include <__algorithm/min.h> #include <__bits> // __libcpp_clz #include <__config> #include <__debug> -#include #include #include #include diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer --- a/libcxx/include/__split_buffer +++ b/libcxx/include/__split_buffer @@ -2,9 +2,17 @@ #ifndef _LIBCPP_SPLIT_BUFFER #define _LIBCPP_SPLIT_BUFFER +#include <__algorithm/max.h> +#include <__algorithm/move.h> +#include <__algorithm/move_backward.h> #include <__config> +#include <__iterator/distance.h> +#include <__iterator/iterator_traits.h> +#include <__iterator/move_iterator.h> +#include <__memory/allocator.h> +#include <__memory/compressed_pair.h> #include <__utility/forward.h> -#include +#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__tree b/libcxx/include/__tree --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -10,9 +10,9 @@ #ifndef _LIBCPP___TREE #define _LIBCPP___TREE +#include <__algorithm/min.h> #include <__config> #include <__utility/forward.h> -#include #include #include #include diff --git a/libcxx/include/array b/libcxx/include/array --- a/libcxx/include/array +++ b/libcxx/include/array @@ -108,10 +108,13 @@ */ +#include <__algorithm/equal.h> +#include <__algorithm/fill_n.h> +#include <__algorithm/lexicographical_compare.h> +#include <__algorithm/swap_ranges.h> #include <__config> #include <__debug> #include <__tuple> -#include #include // for _LIBCPP_UNREACHABLE #include #include diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -160,12 +160,19 @@ */ +#include <__algorithm/copy.h> +#include <__algorithm/copy_backward.h> +#include <__algorithm/equal.h> +#include <__algorithm/fill_n.h> +#include <__algorithm/lexicographical_compare.h> +#include <__algorithm/min.h> +#include <__algorithm/remove.h> +#include <__algorithm/remove_if.h> #include <__config> #include <__debug> #include <__iterator/iterator_traits.h> #include <__split_buffer> #include <__utility/forward.h> -#include #include #include #include diff --git a/libcxx/include/experimental/functional b/libcxx/include/experimental/functional --- a/libcxx/include/experimental/functional +++ b/libcxx/include/experimental/functional @@ -62,7 +62,6 @@ #include <__debug> #include <__memory/uses_allocator.h> -#include #include #include #include diff --git a/libcxx/include/experimental/simd b/libcxx/include/experimental/simd --- a/libcxx/include/experimental/simd +++ b/libcxx/include/experimental/simd @@ -649,7 +649,6 @@ */ -#include #include #include #include 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 @@ -201,6 +201,7 @@ */ +#include <__algorithm/is_permutation.h> #include <__config> #include <__hash_table> #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 @@ -192,6 +192,7 @@ */ +#include <__algorithm/is_permutation.h> #include <__config> #include <__hash_table> #include diff --git a/libcxx/include/format b/libcxx/include/format --- a/libcxx/include/format +++ b/libcxx/include/format @@ -122,6 +122,7 @@ // Enable the contents of the header only when libc++ was built with LIBCXX_ENABLE_INCOMPLETE_FEATURES. #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) +#include <__algorithm/clamp.h> #include <__config> #include <__debug> #include <__format/format_arg.h> diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -179,9 +179,10 @@ */ +#include <__algorithm/lexicographical_compare.h> +#include <__algorithm/min.h> #include <__config> #include <__utility/forward.h> -#include #include #include #include diff --git a/libcxx/include/fstream b/libcxx/include/fstream --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -179,6 +179,7 @@ */ +#include <__algorithm/max.h> #include <__availability> #include <__config> #include <__debug> diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -180,10 +180,12 @@ */ +#include <__algorithm/equal.h> +#include <__algorithm/lexicographical_compare.h> +#include <__algorithm/min.h> #include <__config> #include <__debug> #include <__utility/forward.h> -#include #include #include #include diff --git a/libcxx/include/locale b/libcxx/include/locale --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -187,10 +187,13 @@ */ +#include <__algorithm/equal.h> +#include <__algorithm/find.h> +#include <__algorithm/max.h> +#include <__algorithm/reverse.h> #include <__config> #include <__debug> #include <__locale> -#include #ifndef __APPLE__ # include #endif diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -528,6 +528,8 @@ */ +#include <__algorithm/equal.h> +#include <__algorithm/lexicographical_compare.h> #include <__config> #include <__debug> #include <__functional/is_transparent.h> diff --git a/libcxx/include/queue b/libcxx/include/queue --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -217,11 +217,13 @@ */ +#include <__algorithm/make_heap.h> +#include <__algorithm/pop_heap.h> +#include <__algorithm/push_heap.h> #include <__config> #include <__iterator/iterator_traits.h> #include <__memory/uses_allocator.h> #include <__utility/forward.h> -#include #include #include #include diff --git a/libcxx/include/random b/libcxx/include/random --- a/libcxx/include/random +++ b/libcxx/include/random @@ -1717,7 +1717,6 @@ #include #include -#include // for backward compatibility; TODO remove it #include // for backward compatibility; TODO remove it #include // for backward compatibility; TODO remove it #include // for backward compatibility; TODO remove it diff --git a/libcxx/include/set b/libcxx/include/set --- a/libcxx/include/set +++ b/libcxx/include/set @@ -471,6 +471,8 @@ */ +#include <__algorithm/equal.h> +#include <__algorithm/lexicographical_compare.h> #include <__config> #include <__debug> #include <__functional/is_transparent.h> diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -518,11 +518,13 @@ */ +#include <__algorithm/max.h> +#include <__algorithm/remove.h> +#include <__algorithm/remove_if.h> #include <__config> #include <__debug> #include <__ios/fpos.h> #include <__iterator/wrap_iter.h> -#include #include #include // EOF #include diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -203,7 +203,6 @@ #include <__ranges/enable_view.h> #include <__ranges/size.h> #include <__string> -#include #include #include #include diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -514,6 +514,7 @@ */ +#include <__algorithm/is_permutation.h> #include <__config> #include <__debug> #include <__functional/is_transparent.h> diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -459,6 +459,7 @@ */ +#include <__algorithm/is_permutation.h> #include <__config> #include <__debug> #include <__functional/is_transparent.h> diff --git a/libcxx/include/valarray b/libcxx/include/valarray --- a/libcxx/include/valarray +++ b/libcxx/include/valarray @@ -341,8 +341,12 @@ */ +#include <__algorithm/copy.h> +#include <__algorithm/count.h> +#include <__algorithm/fill.h> +#include <__algorithm/max_element.h> +#include <__algorithm/min.h> #include <__config> -#include #include #include #include diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -271,6 +271,13 @@ */ +#include <__algorithm/copy.h> +#include <__algorithm/equal.h> +#include <__algorithm/fill_n.h> +#include <__algorithm/lexicographical_compare.h> +#include <__algorithm/remove.h> +#include <__algorithm/remove_if.h> +#include <__algorithm/rotate.h> #include <__bit_reference> #include <__config> #include <__debug> @@ -278,7 +285,6 @@ #include <__iterator/wrap_iter.h> #include <__split_buffer> #include <__utility/forward.h> -#include #include #include #include diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp @@ -14,6 +14,7 @@ // -> forward_list::value_type, Allocator>; // +#include #include #include #include diff --git a/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp @@ -10,6 +10,7 @@ // void sort(); +#include #include #include #include