aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/algorithm
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2023-10-11 11:15:58 +0300
committermikhnenko <mikhnenko@yandex-team.com>2023-10-11 12:05:11 +0300
commit84c5d4bb733b49d5f9f36dbf0c22ec200d9e6334 (patch)
tree8dc43a7531874e613966d58a48af6acda89954fe /contrib/libs/cxxsupp/libcxx/include/algorithm
parentb95dc8e862f26368aa0275e2571eefe238c1951e (diff)
downloadydb-84c5d4bb733b49d5f9f36dbf0c22ec200d9e6334.tar.gz
Upd libc++ to 0cc34ca7ecfc9d0efee322f60ed6c3169f4f70ca (12 Apr 2022)
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/algorithm')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/algorithm86
1 files changed, 80 insertions, 6 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/algorithm b/contrib/libs/cxxsupp/libcxx/include/algorithm
index f857870be9..0589f5dcec 100644
--- a/contrib/libs/cxxsupp/libcxx/include/algorithm
+++ b/contrib/libs/cxxsupp/libcxx/include/algorithm
@@ -83,19 +83,88 @@ namespace ranges {
constexpr borrowed_iterator_t<R>
find_if_not(R&& r, Pred pred, Proj proj = {}); // since C++20
- template<class T, class Proj = identity,
- indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
- constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20
+ template<class T, class Proj = identity,
+ indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
+ constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20
- template<copyable T, class Proj = identity,
- indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
- constexpr T min(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20
+ template<copyable T, class Proj = identity,
+ indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
+ constexpr T min(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20
template<input_range R, class Proj = identity,
indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>
constexpr range_value_t<R>
min(R&& r, Comp comp = {}, Proj proj = {}); // since C++20
+
+ template<class T, class Proj = identity,
+ indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
+ constexpr const T& max(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20
+
+ template<copyable T, class Proj = identity,
+ indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
+ constexpr T max(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20
+
+ template<input_range R, class Proj = identity,
+ indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
+ requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>
+ constexpr range_value_t<R>
+ max(R&& r, Comp comp = {}, Proj proj = {}); // since C++20
+
+ template<class I, class O>
+ using unary_transform_result = in_out_result<I, O>; // since C++20
+
+ template<class I1, class I2, class O>
+ using binary_transform_result = in_in_out_result<I1, I2, O>; // since C++20
+
+ template<input_iterator I, sentinel_for<I> S, weakly_incrementable O,
+ copy_constructible F, class Proj = identity>
+ requires indirectly_writable<O, indirect_result_t<F&, projected<I, Proj>>>
+ constexpr ranges::unary_transform_result<I, O>
+ transform(I first1, S last1, O result, F op, Proj proj = {}); // since C++20
+
+ template<input_range R, weakly_incrementable O, copy_constructible F,
+ class Proj = identity>
+ requires indirectly_writable<O, indirect_result_t<F&, projected<iterator_t<R>, Proj>>>
+ constexpr ranges::unary_transform_result<borrowed_iterator_t<R>, O>
+ transform(R&& r, O result, F op, Proj proj = {}); // since C++20
+
+ template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
+ weakly_incrementable O, copy_constructible F, class Proj1 = identity,
+ class Proj2 = identity>
+ requires indirectly_writable<O, indirect_result_t<F&, projected<I1, Proj1>,
+ projected<I2, Proj2>>>
+ constexpr ranges::binary_transform_result<I1, I2, O>
+ transform(I1 first1, S1 last1, I2 first2, S2 last2, O result,
+ F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20
+
+ template<input_range R1, input_range R2, weakly_incrementable O,
+ copy_constructible F, class Proj1 = identity, class Proj2 = identity>
+ requires indirectly_writable<O, indirect_result_t<F&, projected<iterator_t<R1>, Proj1>,
+ projected<iterator_t<R2>, Proj2>>>
+ constexpr ranges::binary_transform_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O>
+ transform(R1&& r1, R2&& r2, O result,
+ F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); // 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 iter_difference_t<I>
+ count(I first, S last, const T& value, Proj proj = {}); // since C++20
+
+ template<input_range R, class T, class Proj = identity>
+ requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
+ constexpr range_difference_t<R>
+ count(R&& r, const T& value, Proj proj = {}); // since C++20
+
+ template<input_iterator I, sentinel_for<I> S, class Proj = identity,
+ indirect_unary_predicate<projected<I, Proj>> Pred>
+ constexpr iter_difference_t<I>
+ count_if(I first, S last, Pred pred, Proj proj = {}); // since C++20
+
+ template<input_range R, class Proj = identity,
+ indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
+ constexpr range_difference_t<R>
+ count_if(R&& r, Pred pred, Proj proj = {}); // since C++20
}
constexpr bool // constexpr in C++20
@@ -733,6 +802,7 @@ template <class BidirectionalIterator, class Compare>
*/
+#include <__assert> // all public C++ headers provide the assertion handler
#include <__bits>
#include <__config>
#include <__debug>
@@ -812,14 +882,18 @@ template <class BidirectionalIterator, class Compare>
#include <__algorithm/pop_heap.h>
#include <__algorithm/prev_permutation.h>
#include <__algorithm/push_heap.h>
+#include <__algorithm/ranges_count.h>
+#include <__algorithm/ranges_count_if.h>
#include <__algorithm/ranges_find.h>
#include <__algorithm/ranges_find_if.h>
#include <__algorithm/ranges_find_if_not.h>
+#include <__algorithm/ranges_max.h>
#include <__algorithm/ranges_max_element.h>
#include <__algorithm/ranges_min.h>
#include <__algorithm/ranges_min_element.h>
#include <__algorithm/ranges_mismatch.h>
#include <__algorithm/ranges_swap_ranges.h>
+#include <__algorithm/ranges_transform.h>
#include <__algorithm/remove.h>
#include <__algorithm/remove_copy.h>
#include <__algorithm/remove_copy_if.h>