// -*- C++ -*- //===--------------------------- ranges -----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP_RANGES #define _LIBCPP_RANGES /* #include // see [compare.syn] #include // see [initializer.list.syn] #include // see [iterator.synopsis] namespace std::ranges { inline namespace unspecified { // [range.access], range access inline constexpr unspecified begin = unspecified; inline constexpr unspecified end = unspecified; inline constexpr unspecified cbegin = unspecified; inline constexpr unspecified cend = unspecified; inline constexpr unspecified size = unspecified; inline constexpr unspecified ssize = unspecified; } // [range.range], ranges template concept range = see below; template inline constexpr bool enable_borrowed_range = false; template using iterator_t = decltype(ranges::begin(declval())); template using sentinel_t = decltype(ranges::end(declval())); template using range_difference_t = iter_difference_t>; template using range_size_t = decltype(ranges::size(declval())); template using range_value_t = iter_value_t>; template using range_reference_t = iter_reference_t>; template using range_rvalue_reference_t = iter_rvalue_reference_t>; // [range.sized], sized ranges template inline constexpr bool disable_sized_range = false; template concept sized_range = ...; // [range.view], views template inline constexpr bool enable_view = ...; struct view_base { }; template concept view = ...; // [range.refinements], other range refinements template concept output_range = see below; template concept input_range = see below; template concept forward_range = see below; template concept bidirectional_range = see below; template concept random_access_range = see below; template concept contiguous_range = see below; template concept common_range = see below; template concept viewable_range = see below; // [view.interface], class template view_interface template requires is_class_v && same_as> class view_interface; // [range.subrange], sub-ranges enum class subrange_kind : bool { unsized, sized }; template S = I, subrange_kind K = see below> requires (K == subrange_kind::sized || !sized_sentinel_for) class subrange; template inline constexpr bool enable_borrowed_range> = true; // [range.dangling], dangling iterator handling struct dangling; template using borrowed_iterator_t = see below; template using borrowed_subrange_t = see below; // [range.empty], empty view template requires is_object_v class empty_view; // [range.all], all view namespace views { inline constexpr unspecified all = unspecified; template using all_t = decltype(all(declval())); } template requires is_object_v class ref_view; template inline constexpr bool enable_borrowed_range> = true; // [range.drop], drop view template class drop_view; template inline constexpr bool enable_borrowed_range> = enable_borrowed_range; // [range.transform], transform view template requires view && is_object_v && regular_invocable> && can-reference>> class transform_view; // [range.common], common view template requires (!common_range && copyable>) class common_view; template inline constexpr bool enable_borrowed_range> = enable_borrowed_range; } */ // Make sure all feature tests macros are always available. #include // Only enable the contents of the header when libc++ was build with LIBCXX_ENABLE_INCOMPLETE_FEATURES enabled #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) #include <__config> #include <__ranges/access.h> #include <__ranges/all.h> #include <__ranges/common_view.h> #include <__ranges/concepts.h> #include <__ranges/dangling.h> #include <__ranges/data.h> #include <__ranges/drop_view.h> #include <__ranges/empty.h> #include <__ranges/empty_view.h> #include <__ranges/enable_borrowed_range.h> #include <__ranges/enable_view.h> #include <__ranges/ref_view.h> #include <__ranges/size.h> #include <__ranges/subrange.h> #include <__ranges/transform_view.h> #include <__ranges/view_interface.h> #include // Required by the standard. #include // Required by the standard. #include // Required by the standard. #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif _LIBCPP_PUSH_MACROS #include <__undef_macros> _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) #endif // _LIBCPP_RANGES