diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-12-25 17:35:41 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-06 20:13:06 +0000 |
commit | cb14a3fe5122c879eae1fb480ed7ce82a699ddb6 (patch) | |
tree | b983a613c35ece61d561b5a9ef9cd66419f6c7fb /contrib/llvm-project/libcxx/include/algorithm | |
parent | 3d68ee6cbdb244de9fab1df8a2525d2fa592571e (diff) | |
parent | 99aabd70801bd4bc72c4942747f6d62c675112f5 (diff) |
Diffstat (limited to 'contrib/llvm-project/libcxx/include/algorithm')
-rw-r--r-- | contrib/llvm-project/libcxx/include/algorithm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/llvm-project/libcxx/include/algorithm b/contrib/llvm-project/libcxx/include/algorithm index 627e7d20213f..1176602a2b69 100644 --- a/contrib/llvm-project/libcxx/include/algorithm +++ b/contrib/llvm-project/libcxx/include/algorithm @@ -42,6 +42,9 @@ namespace ranges { template <class I> struct in_found_result; // since C++20 + template <class I, class T> + struct in_value_result; // since C++23 + template<forward_iterator I, sentinel_for<I> S, class Proj = identity, indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> // since C++20 constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {}); @@ -226,6 +229,14 @@ namespace ranges { template<class I1, class I2> using copy_backward_result = in_out_result<I1, I2>; // since C++20 + template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity> + requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*> + constexpr bool ranges::contains(I first, S last, const T& value, Proj proj = {}); // since C++23 + + template<input_range R, class T, class Proj = identity> + requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*> + constexpr bool ranges::contains(R&& r, const T& value, Proj proj = {}); // since C++23 + template<input_iterator I, sentinel_for<I> S, weakly_incrementable O> requires indirectly_copyable<I, O> constexpr ranges::copy_result<I, O> ranges::copy(I first, S last, O result); // since C++20 @@ -873,6 +884,23 @@ namespace ranges { ranges::search_n(R&& r, range_difference_t<R> count, const T& value, Pred pred = {}, Proj proj = {}); // since C++20 + template<input_iterator I, sentinel_for<I> S, class T, + indirectly-binary-left-foldable<T, I> F> + constexpr auto ranges::fold_left(I first, S last, T init, F f); // since C++23 + + template<input_range R, class T, indirectly-binary-left-foldable<T, iterator_t<R>> F> + constexpr auto fold_left(R&& r, T init, F f); // since C++23 + + template<class I, class T> + using fold_left_with_iter_result = in_value_result<I, T>; // since C++23 + + template<input_iterator I, sentinel_for<I> S, class T, + indirectly-binary-left-foldable<T, I> F> + constexpr see below fold_left_with_iter(I first, S last, T init, F f); // since C++23 + + template<input_range R, class T, indirectly-binary-left-foldable<T, iterator_t<R>> F> + constexpr see below fold_left_with_iter(R&& r, T init, F f); // since C++23 + template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2> @@ -1778,6 +1806,7 @@ template <class BidirectionalIterator, class Compare> #include <__algorithm/find_first_of.h> #include <__algorithm/find_if.h> #include <__algorithm/find_if_not.h> +#include <__algorithm/fold.h> #include <__algorithm/for_each.h> #include <__algorithm/for_each_n.h> #include <__algorithm/generate.h> @@ -1845,6 +1874,7 @@ template <class BidirectionalIterator, class Compare> #include <__algorithm/ranges_any_of.h> #include <__algorithm/ranges_binary_search.h> #include <__algorithm/ranges_clamp.h> +#include <__algorithm/ranges_contains.h> #include <__algorithm/ranges_copy.h> #include <__algorithm/ranges_copy_backward.h> #include <__algorithm/ranges_copy_if.h> |