aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2023-10-14 13:00:57 +0300
committermikhnenko <mikhnenko@yandex-team.com>2023-10-14 13:22:30 +0300
commit4371a757495f375ca7c5b1730f4e9f741a71ec40 (patch)
treebe8f3405e7b0534d29bfb8eec493c0dbe108adc5 /contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
parentecb10029a72bb21f92858ff3c0d76c8f255cf4ba (diff)
downloadydb-4371a757495f375ca7c5b1730f4e9f741a71ec40.tar.gz
Update libc++ to 1 May 2022 639b9618f46d75f4dabd2082b3f6ba8433c287bf
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
index 1a1dfad1d2..6c16b68268 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
@@ -9,17 +9,22 @@
#ifndef _LIBCPP___RANGES_JOIN_VIEW_H
#define _LIBCPP___RANGES_JOIN_VIEW_H
+#include <__concepts/constructible.h>
+#include <__concepts/convertible_to.h>
+#include <__concepts/copyable.h>
+#include <__concepts/derived_from.h>
+#include <__concepts/equality_comparable.h>
#include <__config>
#include <__iterator/concepts.h>
+#include <__iterator/iter_move.h>
+#include <__iterator/iter_swap.h>
#include <__iterator/iterator_traits.h>
#include <__ranges/access.h>
#include <__ranges/all.h>
#include <__ranges/concepts.h>
#include <__ranges/non_propagating_cache.h>
-#include <__ranges/ref_view.h>
-#include <__ranges/subrange.h>
+#include <__ranges/range_adaptor.h>
#include <__ranges/view_interface.h>
-#include <__utility/declval.h>
#include <__utility/forward.h>
#include <optional>
#include <type_traits>
@@ -45,7 +50,8 @@ namespace ranges {
using _InnerC = typename iterator_traits<iterator_t<range_reference_t<_View>>>::iterator_category;
using iterator_category = _If<
- derived_from<_OuterC, bidirectional_iterator_tag> && derived_from<_InnerC, bidirectional_iterator_tag>,
+ derived_from<_OuterC, bidirectional_iterator_tag> && derived_from<_InnerC, bidirectional_iterator_tag> &&
+ common_range<range_reference_t<_View>>,
bidirectional_iterator_tag,
_If<
derived_from<_OuterC, forward_iterator_tag> && derived_from<_InnerC, forward_iterator_tag>,
@@ -204,7 +210,8 @@ namespace ranges {
public:
using iterator_concept = _If<
- __ref_is_glvalue && bidirectional_range<_Base> && bidirectional_range<range_reference_t<_Base>>,
+ __ref_is_glvalue && bidirectional_range<_Base> && bidirectional_range<range_reference_t<_Base>> &&
+ common_range<range_reference_t<_Base>>,
bidirectional_iterator_tag,
_If<
__ref_is_glvalue && forward_range<_Base> && forward_range<range_reference_t<_Base>>,
@@ -339,6 +346,21 @@ namespace ranges {
template<class _Range>
explicit join_view(_Range&&) -> join_view<views::all_t<_Range>>;
+namespace views {
+namespace __join_view {
+struct __fn : __range_adaptor_closure<__fn> {
+ template<class _Range>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+ constexpr auto operator()(_Range&& __range) const
+ noexcept(noexcept(join_view<all_t<_Range&&>>(std::forward<_Range>(__range))))
+ -> decltype( join_view<all_t<_Range&&>>(std::forward<_Range>(__range)))
+ { return join_view<all_t<_Range&&>>(std::forward<_Range>(__range)); }
+};
+} // namespace __join_view
+inline namespace __cpo {
+ inline constexpr auto join = __join_view::__fn{};
+} // namespace __cpo
+} // namespace views
} // namespace ranges
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)