aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/algorithm
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2023-11-15 21:10:56 +0300
committermikhnenko <mikhnenko@yandex-team.com>2023-11-15 22:24:51 +0300
commit401253f291059c8eb079c95e469cc73af2dc2af5 (patch)
treed8135d1197aaeab6daa5c9dbde39a5916ee98f1d /contrib/libs/cxxsupp/libcxx/include/algorithm
parent8e70c7251e94222a2475b7d9b2025b5c33cfd6c1 (diff)
downloadydb-401253f291059c8eb079c95e469cc73af2dc2af5.tar.gz
Upd libc++ to 01 July 2022 da1609ad73540978f66111e96ea500b97ca9b39a
``` [libc++] Improve the formatting of static_assert messages [libc++] Remove dead code and unneeded C++03 specializations from type_traits [libc++] Implement P0618R0 (Deprecating <codecvt>) [libc++] Disentangle _If, _Or and _And Uglify __support/xlocale [libc++][format] Improve pointer formatters. [libc++][format] Improve integral formatters. [libc++] Fix signature of main() in tests [libc++][ranges] Finish LWG issues directly related to the One Ranges Proposal. [libc++] Re-add transitive includes that had been removed since LLVM 14 [libc++] Add a few missing min/max macro push/pop [libc++] Remove dummy command in Dockerfile [libc++] Use bounded iterators in std::span when the debug mode is enabled [libc++] Improve Lit's buildhost=XXXX feature on a few platforms [libc++] Simplify type_traits and use more builtins [libc++] P2321R2 section [tuple.tuple]. Adding C++23 constructors, assignment operators and swaps to `tuple` [libc++][AIX] Make basic_string layout compatible with earlier version [libcxx][test] Suppress complex<int> warnings when testing MSVC [libc++] Add a test to pin down the set of transitive public includes [libc++][format] Copy code to new location. [libc++] Implement ranges::move{, _backward} [libc++] Implement P0154R1 (Hardware inference size) [libc++] Simplify the visibility attributes [libc++] Clarify std::function release note [libc++] Reduces std::to_chars instantiations. [libc++] Fixesbuild. [libc++] fix views::all hard error on lvalue move only views instead of SFINAE [libc++] Complete the implementation of N4190 [libc++] Remove std::function in C++03 [libc++][format] Improve string formatters [libc++] Pass -fno-modules to clang-tidy instead of disabling it for the modules build [libc++][clang-tidy] Enable bugprone-use-after-move and explicitly list all used checks [libc++] Improve charconv base10 algorithm. [libc++][format] Improves the handle test. [libc++] Implement P0174R2 (Deprecating Vestigial Library Parts in C++17) ```
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/algorithm')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/algorithm68
1 files changed, 63 insertions, 5 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/algorithm b/contrib/libs/cxxsupp/libcxx/include/algorithm
index 2dad3e1d41..9146a130bf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/algorithm
+++ b/contrib/libs/cxxsupp/libcxx/include/algorithm
@@ -19,12 +19,17 @@ namespace std
{
namespace ranges {
+
+ // [algorithms.results], algorithm result types
template <class I, class F>
struct in_fun_result; // since C++20
template <class I1, class I2>
struct in_in_result; // since C++20
+ template <class I, class O>
+ struct in_out_result; // since C++20
+
template <class I1, class I2, class O>
struct in_in_out_result; // since C++20
@@ -53,6 +58,9 @@ namespace ranges {
indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
constexpr borrowed_iterator_t<R> ranges::max_element(R&& r, Comp comp = {}, Proj proj = {}); // since C++20
+ template<class I1, class I2>
+ using mismatch_result = in_in_result<I1, I2>;
+
template <input_iterator I1, sentinel_for<_I1> S1, input_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>
@@ -174,6 +182,9 @@ namespace ranges {
constexpr range_difference_t<R>
count_if(R&& r, Pred pred, Proj proj = {}); // since C++20
+ template<class T>
+ using minmax_result = min_max_result<T>;
+
template<class T, class Proj = identity,
indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
constexpr ranges::minmax_result<const T&>
@@ -190,6 +201,9 @@ namespace ranges {
constexpr ranges::minmax_result<range_value_t<R>>
minmax(R&& r, Comp comp = {}, Proj proj = {}); // since C++20
+ template<class I>
+ using minmax_element_result = min_max_result<I>;
+
template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
constexpr ranges::minmax_element_result<I>
@@ -201,10 +215,10 @@ namespace ranges {
minmax_element(R&& r, Comp comp = {}, Proj proj = {}); // since C++20
template<class I, class O>
- using copy_result = in_out_result<I, O>; // since C++20
+ using copy_result = in_out_result<I, O>; // since C++20
- template<class I, class O>
- using copy_n_result = in_out_result<I, O>; // since C++20
+ template<class I, class O>
+ using copy_n_result = in_out_result<I, O>; // since C++20
template<class I, class O>
using copy_if_result = in_out_result<I, O>; // since C++20
@@ -450,6 +464,27 @@ namespace ranges {
ranges::lexicographical_compare(R1&& r1, R2&& r2, Comp comp = {},
Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20
+ template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2>
+ requires indirectly_movable<I1, I2>
+ constexpr ranges::move_backward_result<I1, I2>
+ ranges::move_backward(I1 first, S1 last, I2 result); // since C++20
+
+ template<bidirectional_range R, bidirectional_iterator I>
+ requires indirectly_movable<iterator_t<R>, I>
+ constexpr ranges::move_backward_result<borrowed_iterator_t<R>, I>
+ ranges::move_backward(R&& r, I result); // since C++20
+
+ template<input_iterator I, sentinel_for<I> S, weakly_incrementable O>
+ requires indirectly_movable<I, O>
+ constexpr ranges::move_result<I, O>
+ ranges::move(I first, S last, O result); // since C++20
+
+ template<input_range R, weakly_incrementable O>
+ requires indirectly_movable<iterator_t<R>, O>
+ constexpr ranges::move_result<borrowed_iterator_t<R>, O>
+ ranges::move(R&& r, O result); // since C++20
+
+
}
constexpr bool // constexpr in C++20
@@ -617,19 +652,34 @@ template <class BidirectionalIterator1, class BidirectionalIterator2>
copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,
BidirectionalIterator2 result);
+// [alg.move], move
+template<class InputIterator, class OutputIterator>
+ constexpr OutputIterator move(InputIterator first, InputIterator last,
+ OutputIterator result);
+
+template<class BidirectionalIterator1, class BidirectionalIterator2>
+ constexpr BidirectionalIterator2
+ move_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,
+ BidirectionalIterator2 result);
+
template <class ForwardIterator1, class ForwardIterator2>
constexpr ForwardIterator2 // constexpr in C++20
swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2);
+namespace ranges {
+ template<class I1, class I2>
+ using swap_ranges_result = in_in_result<I1, I2>;
+
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);
+ 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);
+ swap_ranges(R1&& r1, R2&& r2);
+}
template <class ForwardIterator1, class ForwardIterator2>
constexpr void // constexpr in C++20
@@ -1195,6 +1245,8 @@ template <class BidirectionalIterator, class Compare>
#include <__algorithm/ranges_minmax.h>
#include <__algorithm/ranges_minmax_element.h>
#include <__algorithm/ranges_mismatch.h>
+#include <__algorithm/ranges_move.h>
+#include <__algorithm/ranges_move_backward.h>
#include <__algorithm/ranges_none_of.h>
#include <__algorithm/ranges_replace.h>
#include <__algorithm/ranges_replace_if.h>
@@ -1237,6 +1289,12 @@ template <class BidirectionalIterator, class Compare>
#include <__algorithm/unwrap_iter.h>
#include <__algorithm/upper_bound.h>
+#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+# include <chrono>
+# include <iterator>
+# include <utility>
+#endif
+
// standard-mandated includes
#include <initializer_list>