diff options
author | Andrey Khalyavin <halyavin@gmail.com> | 2022-06-24 01:36:20 +0300 |
---|---|---|
committer | Andrey Khalyavin <halyavin@gmail.com> | 2022-06-24 01:36:20 +0300 |
commit | 744d10b39ed56155025137ac4a38e11e72ae7d4a (patch) | |
tree | 07bcc252ab4cd4b4c92aa5e7e1c90215e11db7c7 /contrib/libs/cxxsupp/libcxx/include/algorithm | |
parent | fd274bd81aff99a065469b0c1a0f581b1d401c79 (diff) | |
download | ydb-744d10b39ed56155025137ac4a38e11e72ae7d4a.tar.gz |
Update libc++ to 8f0b2ac1 (12 Feb 2022).
Notable changes:
* use [[no_unique_address]] for field `__base_` in join_view
* remove _LIBCPP_HIDE_FROM_ABI from __threading_support functions
* remove __functional_base header which is just a set of #include directives
* remove unused include in ranges_swap_ranges.h
* do not print bools with "c" format.
* add noexcept to basic_format_context::arg constructor
* add ranges::min_element
* add ranges::in_fun_result
* add ranges::swap_ranges
* add std::vector::reference::operator=(bool) const
* replace _LIBCPP_DEBUG with _LIBCPP_DEBUG_LEVEL
* fix constexpr in __debug_less
* modernize code in compress_pair.h
* add permutable concept
* cleanup format headers
* remove _LIBCPP_ABI_UNSTABLE, we must set _LIBCPP_ABI_VERSION and _LIBCPP_ABI_NAMESPACE outselves now
* make some members private in experimental/functional
* remove std::nullptr_t emulation in C++03 mode
ref:f3c7583f32067a3dd9da42aeb15f1b01d746dc59
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/algorithm')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/algorithm | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/algorithm b/contrib/libs/cxxsupp/libcxx/include/algorithm index 2537e882a1..e4aba31567 100644 --- a/contrib/libs/cxxsupp/libcxx/include/algorithm +++ b/contrib/libs/cxxsupp/libcxx/include/algorithm @@ -19,6 +19,9 @@ namespace std { namespace ranges { + template <class I, class F> + struct in_fun_result; // since C++20 + template <class I1, class I2> struct in_in_result; // since C++20 @@ -27,6 +30,14 @@ namespace ranges { template <class I, class O1, class O2> struct in_out_out_result; // since C++20 + + 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 = {}); + + template<forward_range R, class Proj = identity, + indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> // since C++20 + constexpr borrowed_iterator_t<R> min_element(R&& r, Comp comp = {}, Proj proj = {}); } template <class InputIterator, class Predicate> @@ -199,6 +210,16 @@ template <class ForwardIterator1, class ForwardIterator2> constexpr ForwardIterator2 // constexpr in C++20 swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2); +template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2> + requires indirectly_swappable<I1, I2> + constexpr ranges::swap_ranges_result<I1, I2> + ranges::swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); + +template<input_range R1, input_range R2> + requires indirectly_swappable<iterator_t<R1>, iterator_t<R2>> + constexpr ranges::swap_ranges_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>> + ranges::swap_ranges(R1&& r1, R2&& r2); + template <class ForwardIterator1, class ForwardIterator2> constexpr void // constexpr in C++20 iter_swap(ForwardIterator1 a, ForwardIterator2 b); @@ -651,13 +672,6 @@ template <class BidirectionalIterator> template <class BidirectionalIterator, class Compare> constexpr bool // constexpr in C++20 prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); - -namespace ranges { -// [algorithms.results], algorithm result types -template<class InputIterator, class OutputIterator> - struct in_out_result; -} - } // std */ @@ -702,6 +716,7 @@ template<class InputIterator, class OutputIterator> #include <__algorithm/generate.h> #include <__algorithm/generate_n.h> #include <__algorithm/half_positive.h> +#include <__algorithm/in_fun_result.h> #include <__algorithm/in_in_out_result.h> #include <__algorithm/in_in_result.h> #include <__algorithm/in_out_out_result.h> @@ -739,6 +754,8 @@ template<class InputIterator, class OutputIterator> #include <__algorithm/pop_heap.h> #include <__algorithm/prev_permutation.h> #include <__algorithm/push_heap.h> +#include <__algorithm/ranges_min_element.h> +#include <__algorithm/ranges_swap_ranges.h> #include <__algorithm/remove.h> #include <__algorithm/remove_copy.h> #include <__algorithm/remove_copy_if.h> |