1// -*- C++ -*- 2//===--------------------------- ranges -----------------------------------===// 3// 4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5// See https://llvm.org/LICENSE.txt for license information. 6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef _LIBCPP_RANGES 11#define _LIBCPP_RANGES 12 13/* 14 15#include <compare> // see [compare.syn] 16#include <initializer_list> // see [initializer.list.syn] 17#include <iterator> // see [iterator.synopsis] 18 19namespace std::ranges { 20 inline namespace unspecified { 21 // [range.access], range access 22 inline constexpr unspecified begin = unspecified; 23 inline constexpr unspecified end = unspecified; 24 inline constexpr unspecified cbegin = unspecified; 25 inline constexpr unspecified cend = unspecified; 26 27 inline constexpr unspecified size = unspecified; 28 inline constexpr unspecified ssize = unspecified; 29 } 30 31 // [range.range], ranges 32 template<class T> 33 concept range = see below; 34 35 template<class T> 36 inline constexpr bool enable_borrowed_range = false; 37 38 template<class T> 39 using iterator_t = decltype(ranges::begin(declval<T&>())); 40 template<class T> 41 using iterator_t = decltype(ranges::begin(declval<T&>())); 42 template<range R> 43 using sentinel_t = decltype(ranges::end(declval<R&>())); 44 template<range R> 45 using range_difference_t = iter_difference_t<iterator_t<R>>; 46 template<range R> 47 using range_value_t = iter_value_t<iterator_t<R>>; 48 template<range R> 49 using range_reference_t = iter_reference_t<iterator_t<R>>; 50 template<range R> 51 using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<R>>; 52 53 // [range.sized] 54 template<class> 55 inline constexpr bool disable_sized_range = false; 56 57 template<class T> 58 concept sized_range = ...; 59 60 // [range.view], views 61 template<class T> 62 inline constexpr bool enable_view = ...; 63 64 struct view_base { }; 65 66 template<class T> 67 concept view = ...; 68 69 // [range.refinements], other range refinements 70 template<class T> 71 concept input_range = see below; 72 73 template<class T> 74 concept forward_range = see below; 75 76 template<class T> 77 concept bidirectional_range = see below; 78 79 template <class _Tp> 80 concept common_range = see below; 81 82 // [view.interface], class template view_interface 83 template<class D> 84 requires is_class_v<D> && same_as<D, remove_cv_t<D>> 85 class view_interface; 86 87 // [range.empty], empty view 88 template<class T> 89 requires is_object_v<T> 90 class empty_view; 91} 92 93*/ 94 95#include <__config> 96#include <__ranges/access.h> 97#include <__ranges/all.h> 98#include <__ranges/concepts.h> 99#include <__ranges/data.h> 100#include <__ranges/empty.h> 101#include <__ranges/empty_view.h> 102#include <__ranges/enable_borrowed_range.h> 103#include <__ranges/enable_view.h> 104#include <__ranges/ref_view.h> 105#include <__ranges/size.h> 106#include <__ranges/subrange.h> 107#include <__ranges/view_interface.h> 108#include <compare> // Required by the standard. 109#include <initializer_list> // Required by the standard. 110#include <iterator> // Required by the standard. 111#include <type_traits> 112#include <version> 113 114#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 115#pragma GCC system_header 116#endif 117 118_LIBCPP_PUSH_MACROS 119#include <__undef_macros> 120 121_LIBCPP_BEGIN_NAMESPACE_STD 122 123#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) 124 125#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) 126 127_LIBCPP_END_NAMESPACE_STD 128 129_LIBCPP_POP_MACROS 130 131#endif // _LIBCPP_RANGES 132