aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/algorithm
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2023-11-02 19:27:12 +0300
committermikhnenko <mikhnenko@yandex-team.com>2023-11-02 20:14:23 +0300
commitea7266e3afdfe76274c756747fbd24626e1c205a (patch)
tree9b8370f3cf8d4399fc960a2c50aa9759f5acf554 /contrib/libs/cxxsupp/libcxx/include/algorithm
parenta528d5d25d42706fe385120b27e1df3a257823fb (diff)
downloadydb-ea7266e3afdfe76274c756747fbd24626e1c205a.tar.gz
Upd libc++ to 14 Jun 2022 1cf4113952ae3e4cc75decdf6feb3ce5dd8ca4a1
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/algorithm')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/algorithm88
1 files changed, 87 insertions, 1 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/algorithm b/contrib/libs/cxxsupp/libcxx/include/algorithm
index 4718451e2e..44ecb14a01 100644
--- a/contrib/libs/cxxsupp/libcxx/include/algorithm
+++ b/contrib/libs/cxxsupp/libcxx/include/algorithm
@@ -345,6 +345,85 @@ namespace ranges {
indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
constexpr borrowed_iterator_t<R>
ranges::is_sorted_until(R&& r, Comp comp = {}, Proj proj = {}); // since C++20
+
+ template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
+ indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
+ constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); // since C++20
+
+ template<forward_range R, class T, class Proj = identity,
+ indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
+ ranges::less>
+ constexpr borrowed_iterator_t<R>
+ upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); // since C++20
+
+ template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
+ indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
+ constexpr I lower_bound(I first, S last, const T& value, Comp comp = {},
+ Proj proj = {}); // since C++20
+ template<forward_range R, class T, class Proj = identity,
+ indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
+ ranges::less>
+ constexpr borrowed_iterator_t<R>
+ lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); // since C++20
+
+ template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
+ indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
+ constexpr bool binary_search(I first, S last, const T& value, Comp comp = {},
+ Proj proj = {}); // since C++20
+
+ template<forward_range R, class T, class Proj = identity,
+ indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
+ ranges::less>
+ constexpr bool binary_search(R&& r, const T& value, Comp comp = {},
+ Proj proj = {}); // since C++20
+ template<input_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>
+ constexpr I1 ranges::find_first_of(I1 first1, S1 last1, I2 first2, S2 last2,
+ Pred pred = {},
+ Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20
+
+ template<input_range R1, forward_range R2,
+ class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
+ requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
+ constexpr borrowed_iterator_t<R1>
+ ranges::find_first_of(R1&& r1, R2&& r2,
+ Pred pred = {},
+ Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20
+
+ template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
+ indirect_binary_predicate<projected<I, Proj>,
+ projected<I, Proj>> Pred = ranges::equal_to>
+ constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); // since C+20
+
+ template<forward_range R, class Proj = identity,
+ indirect_binary_predicate<projected<iterator_t<R>, Proj>,
+ projected<iterator_t<R>, Proj>> Pred = ranges::equal_to>
+ constexpr borrowed_iterator_t<R> ranges::adjacent_find(R&& r, Pred pred = {}, Proj proj = {}); // since C++20
+
+ template<input_iterator I, sentinel_for<I> S, class T1, class T2, class Proj = identity>
+ requires indirectly_writable<I, const T2&> &&
+ indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T1*>
+ constexpr I
+ ranges::replace(I first, S last, const T1& old_value, const T2& new_value, Proj proj = {}); // since C++20
+
+ template<input_range R, class T1, class T2, class Proj = identity>
+ requires indirectly_writable<iterator_t<R>, const T2&> &&
+ indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T1*>
+ constexpr borrowed_iterator_t<R>
+ ranges::replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); // since C++20
+
+ template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity,
+ indirect_unary_predicate<projected<I, Proj>> Pred>
+ requires indirectly_writable<I, const T&>
+ constexpr I ranges::replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); // since C++20
+
+ template<input_range R, class T, class Proj = identity,
+ indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
+ requires indirectly_writable<iterator_t<R>, const T&>
+ constexpr borrowed_iterator_t<R>
+ ranges::replace_if(R&& r, Pred pred, const T& new_value, Proj proj = {}); // since C++20
+
}
constexpr bool // constexpr in C++20
@@ -989,7 +1068,7 @@ template <class BidirectionalIterator, class Compare>
#include <cstddef>
#include <cstring>
#include <initializer_list>
-#include <iterator>
+#include <iterator> // TODO: Remove this include
#include <memory>
#include <type_traits>
#include <version>
@@ -1061,8 +1140,10 @@ template <class BidirectionalIterator, class Compare>
#include <__algorithm/pop_heap.h>
#include <__algorithm/prev_permutation.h>
#include <__algorithm/push_heap.h>
+#include <__algorithm/ranges_adjacent_find.h>
#include <__algorithm/ranges_all_of.h>
#include <__algorithm/ranges_any_of.h>
+#include <__algorithm/ranges_binary_search.h>
#include <__algorithm/ranges_copy.h>
#include <__algorithm/ranges_copy_backward.h>
#include <__algorithm/ranges_copy_if.h>
@@ -1073,6 +1154,7 @@ template <class BidirectionalIterator, class Compare>
#include <__algorithm/ranges_fill.h>
#include <__algorithm/ranges_fill_n.h>
#include <__algorithm/ranges_find.h>
+#include <__algorithm/ranges_find_first_of.h>
#include <__algorithm/ranges_find_if.h>
#include <__algorithm/ranges_find_if_not.h>
#include <__algorithm/ranges_for_each.h>
@@ -1080,6 +1162,7 @@ template <class BidirectionalIterator, class Compare>
#include <__algorithm/ranges_is_partitioned.h>
#include <__algorithm/ranges_is_sorted.h>
#include <__algorithm/ranges_is_sorted_until.h>
+#include <__algorithm/ranges_lower_bound.h>
#include <__algorithm/ranges_max.h>
#include <__algorithm/ranges_max_element.h>
#include <__algorithm/ranges_min.h>
@@ -1088,9 +1171,12 @@ template <class BidirectionalIterator, class Compare>
#include <__algorithm/ranges_minmax_element.h>
#include <__algorithm/ranges_mismatch.h>
#include <__algorithm/ranges_none_of.h>
+#include <__algorithm/ranges_replace.h>
+#include <__algorithm/ranges_replace_if.h>
#include <__algorithm/ranges_reverse.h>
#include <__algorithm/ranges_swap_ranges.h>
#include <__algorithm/ranges_transform.h>
+#include <__algorithm/ranges_upper_bound.h>
#include <__algorithm/remove.h>
#include <__algorithm/remove_copy.h>
#include <__algorithm/remove_copy_if.h>