blob: 9062e34c4c9726c224068905914db2eeef03af4b [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;
Christopher Di Bella66ce1292021-04-11 05:08:32 +000028 }
29
Mark de Weveraf59b2d2020-11-24 18:08:02 +010030 // [range.range], ranges
31 template<class T>
Christopher Di Bella9db3ef22021-04-11 17:40:30 +000032 concept range = see below;
33
34 template<class T>
Mark de Weveraf59b2d2020-11-24 18:08:02 +010035 inline constexpr bool enable_borrowed_range = false;
Christopher Di Bella66ce1292021-04-11 05:08:32 +000036
37 template<class T>
38 using iterator_t = decltype(ranges::begin(declval<T&>()));
Christopher Di Bella9db3ef22021-04-11 17:40:30 +000039 template<class T>
40 using iterator_t = decltype(ranges::begin(declval<T&>()));
41 template<range R>
42 using sentinel_t = decltype(ranges::end(declval<R&>()));
43 template<range R>
44 using range_difference_t = iter_difference_t<iterator_t<R>>;
45 template<range R>
46 using range_value_t = iter_value_t<iterator_t<R>>;
47 template<range R>
48 using range_reference_t = iter_reference_t<iterator_t<R>>;
49 template<range R>
50 using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<R>>;
51
Louis Dionnefa8282c2021-04-28 15:22:11 -040052 // [range.view], views
53 template<class T>
54 inline constexpr bool enable_view = ...;
55
56 struct view_base { };
57
58 template<class T>
59 concept view = ...;
60
Christopher Di Bella9db3ef22021-04-11 17:40:30 +000061 // [range.refinements], other range refinements
Christopher Di Bella8250c632021-04-11 19:04:52 +000062 template<class T>
63 concept input_range = see below;
64
Christopher Di Bella8f1370d2021-04-11 22:11:03 +000065 template<class T>
66 concept forward_range = see below;
67
Christopher Di Bella10a31472021-04-12 01:16:45 +000068 template<class T>
69 concept bidirectional_range = see below;
70
Christopher Di Bella9db3ef22021-04-11 17:40:30 +000071 template <class _Tp>
72 concept common_range = see below;
Mark de Weveraf59b2d2020-11-24 18:08:02 +010073}
74
75*/
76
77#include <__config>
Christopher Di Bella66ce1292021-04-11 05:08:32 +000078#include <__ranges/access.h>
Christopher Di Bella9db3ef22021-04-11 17:40:30 +000079#include <__ranges/concepts.h>
Mark de Weveraf59b2d2020-11-24 18:08:02 +010080#include <__ranges/enable_borrowed_range.h>
Louis Dionnefa8282c2021-04-28 15:22:11 -040081#include <__ranges/view.h>
zoecarvere3a4b182021-04-22 09:29:02 -070082#include <__ranges/size.h>
Mark de Weveraf59b2d2020-11-24 18:08:02 +010083#include <compare> // Required by the standard.
84#include <initializer_list> // Required by the standard.
85#include <iterator> // Required by the standard.
86#include <type_traits>
87#include <version>
88
89#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
90#pragma GCC system_header
91#endif
92
93_LIBCPP_PUSH_MACROS
94#include <__undef_macros>
95
96_LIBCPP_BEGIN_NAMESPACE_STD
97
98#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES)
99
100#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES)
101
102_LIBCPP_END_NAMESPACE_STD
103
104_LIBCPP_POP_MACROS
105
106#endif // _LIBCPP_RANGES