blob: 5401add0eab41af8f166441a29fbcb073b263369 [file] [log] [blame]
Mark de Weveraf59b2d2020-11-24 18:08:02 +01001// -*- 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 {
Christopher Di Bella66ce1292021-04-11 05:08:32 +000020 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;
zoecarvere3a4b182021-04-22 09:29:02 -070026
27 inline constexpr unspecified size = unspecified;
zoecarver9ce1b4d2021-04-23 11:23:22 -070028 inline constexpr unspecified ssize = unspecified;
Christopher Di Bella66ce1292021-04-11 05:08:32 +000029 }
30
Mark de Weveraf59b2d2020-11-24 18:08:02 +010031 // [range.range], ranges
32 template<class T>
Christopher Di Bella9db3ef22021-04-11 17:40:30 +000033 concept range = see below;
34
35 template<class T>
Mark de Weveraf59b2d2020-11-24 18:08:02 +010036 inline constexpr bool enable_borrowed_range = false;
Christopher Di Bella66ce1292021-04-11 05:08:32 +000037
38 template<class T>
39 using iterator_t = decltype(ranges::begin(declval<T&>()));
Christopher Di Bella9db3ef22021-04-11 17:40:30 +000040 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
Louis Dionnefa8282c2021-04-28 15:22:11 -040053 // [range.view], views
54 template<class T>
55 inline constexpr bool enable_view = ...;
56
57 struct view_base { };
58
59 template<class T>
60 concept view = ...;
61
Christopher Di Bella9db3ef22021-04-11 17:40:30 +000062 // [range.refinements], other range refinements
Christopher Di Bella8250c632021-04-11 19:04:52 +000063 template<class T>
64 concept input_range = see below;
65
Christopher Di Bella8f1370d2021-04-11 22:11:03 +000066 template<class T>
67 concept forward_range = see below;
68
Christopher Di Bella10a31472021-04-12 01:16:45 +000069 template<class T>
70 concept bidirectional_range = see below;
71
Christopher Di Bella9db3ef22021-04-11 17:40:30 +000072 template <class _Tp>
73 concept common_range = see below;
Mark de Weveraf59b2d2020-11-24 18:08:02 +010074}
75
76*/
77
78#include <__config>
Christopher Di Bella66ce1292021-04-11 05:08:32 +000079#include <__ranges/access.h>
Christopher Di Bella9db3ef22021-04-11 17:40:30 +000080#include <__ranges/concepts.h>
zoecarver85d69332021-04-23 12:34:22 -070081#include <__ranges/empty.h>
Mark de Weveraf59b2d2020-11-24 18:08:02 +010082#include <__ranges/enable_borrowed_range.h>
Louis Dionnefa8282c2021-04-28 15:22:11 -040083#include <__ranges/view.h>
zoecarvere3a4b182021-04-22 09:29:02 -070084#include <__ranges/size.h>
Mark de Weveraf59b2d2020-11-24 18:08:02 +010085#include <compare> // Required by the standard.
86#include <initializer_list> // Required by the standard.
87#include <iterator> // Required by the standard.
88#include <type_traits>
89#include <version>
90
91#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
92#pragma GCC system_header
93#endif
94
95_LIBCPP_PUSH_MACROS
96#include <__undef_macros>
97
98_LIBCPP_BEGIN_NAMESPACE_STD
99
100#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES)
101
102#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES)
103
104_LIBCPP_END_NAMESPACE_STD
105
106_LIBCPP_POP_MACROS
107
108#endif // _LIBCPP_RANGES