aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/ranges
diff options
context:
space:
mode:
authorhiddenpath <hiddenpath@yandex-team.com>2024-02-21 23:16:42 +0300
committerhiddenpath <hiddenpath@yandex-team.com>2024-02-21 23:33:25 +0300
commit9052eb5cc304b8da8885fc4e3364ebddc16945f3 (patch)
tree3c252f6161dd0745c7732d74c9304c000645ab47 /contrib/libs/cxxsupp/libcxx/include/ranges
parentf5eb715f103692e7c7536e13bef3f281fd78e5e7 (diff)
downloadydb-9052eb5cc304b8da8885fc4e3364ebddc16945f3.tar.gz
Update libcxx to llvmorg-17.0.6
Update libcxx to llvmorg-17.0.6 c871ef572c71b4fef22d4a9e65bcebc57e625aea
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/ranges')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ranges47
1 files changed, 41 insertions, 6 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/ranges b/contrib/libs/cxxsupp/libcxx/include/ranges
index f999fa00c3..523f7cdcb3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/ranges
+++ b/contrib/libs/cxxsupp/libcxx/include/ranges
@@ -49,6 +49,8 @@ namespace std::ranges {
using range_reference_t = iter_reference_t<iterator_t<R>>;
template<range R>
using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<R>>;
+ template <range R>
+ using range_common_reference_t = iter_common_reference_t<iterator_t<R>>;
// [range.sized], sized ranges
template<class>
@@ -136,6 +138,16 @@ namespace std::ranges {
inline constexpr auto values = elements<1>;
}
+ // [range.utility.conv], range conversions
+ template<class C, input_range R, class... Args> requires (!view<C>)
+ constexpr C to(R&& r, Args&&... args); // Since C++23
+ template<template<class...> class C, input_range R, class... Args>
+ constexpr auto to(R&& r, Args&&... args); // Since C++23
+ template<class C, class... Args> requires (!view<C>)
+ constexpr auto to(Args&&... args); // Since C++23
+ template<template<class...> class C, class... Args>
+ constexpr auto to(Args&&... args); // Since C++23
+
// [range.empty], empty view
template<class T>
requires is_object_v<T>
@@ -250,6 +262,19 @@ namespace std::ranges {
template<class W, class Bound>
inline constexpr bool enable_borrowed_range<iota_view<W, Bound>> = true;
+ // [range.repeat], repeat view
+ template<class T>
+ concept integer-like-with-usable-difference-type = // exposition only
+ is-signed-integer-like<T> || (is-integer-like<T> && weakly_incrementable<T>);
+
+ template<move_constructible T, semiregular Bound = unreachable_sentinel_t>
+ requires (is_object_v<T> && same_as<T, remove_cv_t<T>> &&
+ (integer-like-with-usable-difference-type<Bound> ||
+ same_as<Bound, unreachable_sentinel_t>))
+ class repeat_view;
+
+ namespace views { inline constexpr unspecified repeat = unspecified; }
+
// [range.join], join view
template<input_range V>
requires view<V> && input_range<range_reference_t<V>>
@@ -292,13 +317,13 @@ namespace std::ranges {
// [range.zip], zip view
template<input_range... Views>
requires (view<Views> && ...) && (sizeof...(Views) > 0)
- class zip_view; // C++2b
+ class zip_view; // C++23
template<class... Views>
- inline constexpr bool enable_borrowed_range<zip_view<Views...>> = // C++2b
+ inline constexpr bool enable_borrowed_range<zip_view<Views...>> = // C++23
(enable_borrowed_range<Views> && ...);
- namespace views { inline constexpr unspecified zip = unspecified; } // C++2b
+ namespace views { inline constexpr unspecified zip = unspecified; } // C++23
// [range.as.rvalue]
template <view V>
@@ -337,6 +362,9 @@ namespace std {
struct tuple_element<1, const ranges::subrange<I, S, K>> {
using type = S;
};
+
+ struct from_range_t { explicit from_range_t() = default; }; // Since C++23
+ inline constexpr from_range_t from_range{}; // Since C++23
}
*/
@@ -358,12 +386,14 @@ namespace std {
#include <__ranges/enable_borrowed_range.h>
#include <__ranges/enable_view.h>
#include <__ranges/filter_view.h>
+#include <__ranges/from_range.h>
#include <__ranges/iota_view.h>
#include <__ranges/join_view.h>
#include <__ranges/lazy_split_view.h>
#include <__ranges/rbegin.h>
#include <__ranges/ref_view.h>
#include <__ranges/rend.h>
+#include <__ranges/repeat_view.h>
#include <__ranges/reverse_view.h>
#include <__ranges/single_view.h>
#include <__ranges/size.h>
@@ -371,11 +401,11 @@ namespace std {
#include <__ranges/subrange.h>
#include <__ranges/take_view.h>
#include <__ranges/take_while_view.h>
+#include <__ranges/to.h>
#include <__ranges/transform_view.h>
#include <__ranges/view_interface.h>
#include <__ranges/views.h>
#include <__ranges/zip_view.h>
-#include <type_traits>
#include <version>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
@@ -390,11 +420,16 @@ namespace std {
#include <iterator>
// [tuple.helper]
-#include <__tuple_dir/tuple_element.h>
-#include <__tuple_dir/tuple_size.h>
+#include <__tuple/tuple_element.h>
+#include <__tuple/tuple_size.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <cstdlib>
+# include <type_traits>
+#endif
+
#endif // _LIBCPP_RANGES