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 28 // [range.range], ranges 29 template<class T> 30 concept range = see below; 31 32 template<class T> 33 inline constexpr bool enable_borrowed_range = false; 34 35 template<class T> 36 using iterator_t = decltype(ranges::begin(declval<T&>())); 37 template<class T> 38 using iterator_t = decltype(ranges::begin(declval<T&>())); 39 template<range R> 40 using sentinel_t = decltype(ranges::end(declval<R&>())); 41 template<range R> 42 using range_difference_t = iter_difference_t<iterator_t<R>>; 43 template<range R> 44 using range_value_t = iter_value_t<iterator_t<R>>; 45 template<range R> 46 using range_reference_t = iter_reference_t<iterator_t<R>>; 47 template<range R> 48 using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<R>>; 49 50 // [range.refinements], other range refinements 51 template <class _Tp> 52 concept common_range = see below; 53} 54 55*/ 56 57#include <__config> 58#include <__ranges/access.h> 59#include <__ranges/concepts.h> 60#include <__ranges/enable_borrowed_range.h> 61#include <compare> // Required by the standard. 62#include <initializer_list> // Required by the standard. 63#include <iterator> // Required by the standard. 64#include <type_traits> 65#include <version> 66 67#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 68#pragma GCC system_header 69#endif 70 71_LIBCPP_PUSH_MACROS 72#include <__undef_macros> 73 74_LIBCPP_BEGIN_NAMESPACE_STD 75 76#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) 77 78#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) 79 80_LIBCPP_END_NAMESPACE_STD 81 82_LIBCPP_POP_MACROS 83 84#endif // _LIBCPP_RANGES 85