xref: /freebsd/contrib/llvm-project/libcxx/include/ranges (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1fe6060f1SDimitry Andric// -*- C++ -*-
2349cc55cSDimitry Andric//===----------------------------------------------------------------------===//
3fe6060f1SDimitry Andric//
4fe6060f1SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5fe6060f1SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
6fe6060f1SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7fe6060f1SDimitry Andric//
8fe6060f1SDimitry Andric//===----------------------------------------------------------------------===//
9fe6060f1SDimitry Andric
10fe6060f1SDimitry Andric#ifndef _LIBCPP_RANGES
11fe6060f1SDimitry Andric#define _LIBCPP_RANGES
12fe6060f1SDimitry Andric
13fe6060f1SDimitry Andric/*
14fe6060f1SDimitry Andric
15fe6060f1SDimitry Andric#include <compare>              // see [compare.syn]
16fe6060f1SDimitry Andric#include <initializer_list>     // see [initializer.list.syn]
17fe6060f1SDimitry Andric#include <iterator>             // see [iterator.synopsis]
18fe6060f1SDimitry Andric
19fe6060f1SDimitry Andricnamespace std::ranges {
20fe6060f1SDimitry Andric  inline namespace unspecified {
21fe6060f1SDimitry Andric    // [range.access], range access
22fe6060f1SDimitry Andric    inline constexpr unspecified begin = unspecified;
23fe6060f1SDimitry Andric    inline constexpr unspecified end = unspecified;
24fe6060f1SDimitry Andric    inline constexpr unspecified cbegin = unspecified;
25fe6060f1SDimitry Andric    inline constexpr unspecified cend = unspecified;
26fe6060f1SDimitry Andric
27fe6060f1SDimitry Andric    inline constexpr unspecified size = unspecified;
28fe6060f1SDimitry Andric    inline constexpr unspecified ssize = unspecified;
29fe6060f1SDimitry Andric  }
30fe6060f1SDimitry Andric
31fe6060f1SDimitry Andric  // [range.range], ranges
32fe6060f1SDimitry Andric  template<class T>
33fe6060f1SDimitry Andric    concept range = see below;
34fe6060f1SDimitry Andric
35fe6060f1SDimitry Andric  template<class T>
36fe6060f1SDimitry Andric    inline constexpr bool enable_borrowed_range = false;
37fe6060f1SDimitry Andric
38fe6060f1SDimitry Andric  template<class T>
394824e7fdSDimitry Andric    using iterator_t = decltype(ranges::begin(declval<T&>()));
40fe6060f1SDimitry Andric  template<range R>
41fe6060f1SDimitry Andric    using sentinel_t = decltype(ranges::end(declval<R&>()));
42fe6060f1SDimitry Andric  template<range R>
43fe6060f1SDimitry Andric    using range_difference_t = iter_difference_t<iterator_t<R>>;
44fe6060f1SDimitry Andric  template<sized_range R>
45fe6060f1SDimitry Andric    using range_size_t = decltype(ranges::size(declval<R&>()));
46fe6060f1SDimitry Andric  template<range R>
47fe6060f1SDimitry Andric    using range_value_t = iter_value_t<iterator_t<R>>;
48fe6060f1SDimitry Andric  template<range R>
49fe6060f1SDimitry Andric    using range_reference_t = iter_reference_t<iterator_t<R>>;
50fe6060f1SDimitry Andric  template<range R>
51fe6060f1SDimitry Andric    using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<R>>;
52*06c3fb27SDimitry Andric  template <range R>
53*06c3fb27SDimitry Andric    using range_common_reference_t = iter_common_reference_t<iterator_t<R>>;
54fe6060f1SDimitry Andric
55fe6060f1SDimitry Andric  // [range.sized], sized ranges
56fe6060f1SDimitry Andric  template<class>
57fe6060f1SDimitry Andric    inline constexpr bool disable_sized_range = false;
58fe6060f1SDimitry Andric
59fe6060f1SDimitry Andric  template<class T>
60fe6060f1SDimitry Andric    concept sized_range = ...;
61fe6060f1SDimitry Andric
62fe6060f1SDimitry Andric  // [range.view], views
63fe6060f1SDimitry Andric  template<class T>
64fe6060f1SDimitry Andric    inline constexpr bool enable_view = ...;
65fe6060f1SDimitry Andric
66fe6060f1SDimitry Andric  struct view_base { };
67fe6060f1SDimitry Andric
68fe6060f1SDimitry Andric  template<class T>
69fe6060f1SDimitry Andric    concept view = ...;
70fe6060f1SDimitry Andric
71fe6060f1SDimitry Andric  // [range.refinements], other range refinements
72fe6060f1SDimitry Andric  template<class R, class T>
73fe6060f1SDimitry Andric    concept output_range = see below;
74fe6060f1SDimitry Andric
75fe6060f1SDimitry Andric  template<class T>
76fe6060f1SDimitry Andric    concept input_range = see below;
77fe6060f1SDimitry Andric
78fe6060f1SDimitry Andric  template<class T>
79fe6060f1SDimitry Andric    concept forward_range = see below;
80fe6060f1SDimitry Andric
81fe6060f1SDimitry Andric  template<class T>
82fe6060f1SDimitry Andric  concept bidirectional_range = see below;
83fe6060f1SDimitry Andric
84fe6060f1SDimitry Andric  template<class T>
85fe6060f1SDimitry Andric  concept random_access_range = see below;
86fe6060f1SDimitry Andric
87fe6060f1SDimitry Andric  template<class T>
88fe6060f1SDimitry Andric  concept contiguous_range = see below;
89fe6060f1SDimitry Andric
90fe6060f1SDimitry Andric  template <class _Tp>
91fe6060f1SDimitry Andric    concept common_range = see below;
92fe6060f1SDimitry Andric
93fe6060f1SDimitry Andric  template<class T>
94fe6060f1SDimitry Andric  concept viewable_range = see below;
95fe6060f1SDimitry Andric
96fe6060f1SDimitry Andric  // [view.interface], class template view_interface
97fe6060f1SDimitry Andric  template<class D>
98fe6060f1SDimitry Andric    requires is_class_v<D> && same_as<D, remove_cv_t<D>>
99fe6060f1SDimitry Andric  class view_interface;
100fe6060f1SDimitry Andric
101fe6060f1SDimitry Andric  // [range.subrange], sub-ranges
102fe6060f1SDimitry Andric  enum class subrange_kind : bool { unsized, sized };
103fe6060f1SDimitry Andric
104fe6060f1SDimitry Andric  template<input_or_output_iterator I, sentinel_for<I> S = I, subrange_kind K = see below>
105fe6060f1SDimitry Andric    requires (K == subrange_kind::sized || !sized_sentinel_for<S, I>)
106fe6060f1SDimitry Andric  class subrange;
107fe6060f1SDimitry Andric
108fe6060f1SDimitry Andric  template<class I, class S, subrange_kind K>
109fe6060f1SDimitry Andric    inline constexpr bool enable_borrowed_range<subrange<I, S, K>> = true;
110fe6060f1SDimitry Andric
111fe6060f1SDimitry Andric  // [range.dangling], dangling iterator handling
112fe6060f1SDimitry Andric  struct dangling;
113fe6060f1SDimitry Andric
114fe6060f1SDimitry Andric  template<range R>
115fe6060f1SDimitry Andric    using borrowed_iterator_t = see below;
116fe6060f1SDimitry Andric
117fe6060f1SDimitry Andric  template<range R>
118fe6060f1SDimitry Andric    using borrowed_subrange_t = see below;
119fe6060f1SDimitry Andric
120bdd1243dSDimitry Andric  // [range.elements], elements view
121bdd1243dSDimitry Andric  template<input_range V, size_t N>
122bdd1243dSDimitry Andric    requires see below
123bdd1243dSDimitry Andric  class elements_view;
124bdd1243dSDimitry Andric
125bdd1243dSDimitry Andric  template<class T, size_t N>
126bdd1243dSDimitry Andric    inline constexpr bool enable_borrowed_range<elements_view<T, N>> =
127bdd1243dSDimitry Andric      enable_borrowed_range<T>;
128bdd1243dSDimitry Andric
129bdd1243dSDimitry Andric  template<class R>
130bdd1243dSDimitry Andric    using keys_view = elements_view<R, 0>;
131bdd1243dSDimitry Andric  template<class R>
132bdd1243dSDimitry Andric    using values_view = elements_view<R, 1>;
133bdd1243dSDimitry Andric
134bdd1243dSDimitry Andric  namespace views {
135bdd1243dSDimitry Andric    template<size_t N>
136bdd1243dSDimitry Andric      inline constexpr unspecified elements = unspecified;
137bdd1243dSDimitry Andric    inline constexpr auto keys = elements<0>;
138bdd1243dSDimitry Andric    inline constexpr auto values = elements<1>;
139bdd1243dSDimitry Andric  }
140bdd1243dSDimitry Andric
141*06c3fb27SDimitry Andric  // [range.utility.conv], range conversions
142*06c3fb27SDimitry Andric  template<class C, input_range R, class... Args> requires (!view<C>)
143*06c3fb27SDimitry Andric    constexpr C to(R&& r, Args&&... args);     // Since C++23
144*06c3fb27SDimitry Andric  template<template<class...> class C, input_range R, class... Args>
145*06c3fb27SDimitry Andric    constexpr auto to(R&& r, Args&&... args);  // Since C++23
146*06c3fb27SDimitry Andric  template<class C, class... Args> requires (!view<C>)
147*06c3fb27SDimitry Andric    constexpr auto to(Args&&... args);         // Since C++23
148*06c3fb27SDimitry Andric  template<template<class...> class C, class... Args>
149*06c3fb27SDimitry Andric    constexpr auto to(Args&&... args);         // Since C++23
150*06c3fb27SDimitry Andric
151fe6060f1SDimitry Andric  // [range.empty], empty view
152fe6060f1SDimitry Andric  template<class T>
153fe6060f1SDimitry Andric    requires is_object_v<T>
154fe6060f1SDimitry Andric  class empty_view;
155fe6060f1SDimitry Andric
15681ad6265SDimitry Andric  template<class T>
15781ad6265SDimitry Andric    inline constexpr bool enable_borrowed_range<empty_view<T>> = true;
15881ad6265SDimitry Andric
15981ad6265SDimitry Andric  namespace views {
16081ad6265SDimitry Andric    template<class T>
16181ad6265SDimitry Andric      inline constexpr empty_view<T> empty{};
16281ad6265SDimitry Andric  }
16381ad6265SDimitry Andric
164fe6060f1SDimitry Andric  // [range.all], all view
165fe6060f1SDimitry Andric  namespace views {
166fe6060f1SDimitry Andric    inline constexpr unspecified all = unspecified;
167fe6060f1SDimitry Andric
168fe6060f1SDimitry Andric    template<viewable_range R>
169fe6060f1SDimitry Andric      using all_t = decltype(all(declval<R>()));
170fe6060f1SDimitry Andric  }
171fe6060f1SDimitry Andric
172fe6060f1SDimitry Andric  template<range R>
173fe6060f1SDimitry Andric    requires is_object_v<R>
174fe6060f1SDimitry Andric  class ref_view;
175fe6060f1SDimitry Andric
176fe6060f1SDimitry Andric  template<class T>
177fe6060f1SDimitry Andric    inline constexpr bool enable_borrowed_range<ref_view<T>> = true;
178fe6060f1SDimitry Andric
17904eeddc0SDimitry Andric  template<range R>
18004eeddc0SDimitry Andric    requires see below
18104eeddc0SDimitry Andric  class owning_view;
18204eeddc0SDimitry Andric
18304eeddc0SDimitry Andric  template<class T>
18404eeddc0SDimitry Andric    inline constexpr bool enable_borrowed_range<owning_view<T>> = enable_borrowed_range<T>;
18504eeddc0SDimitry Andric
18681ad6265SDimitry Andric  // [range.filter], filter view
18781ad6265SDimitry Andric  template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
18881ad6265SDimitry Andric    requires view<V> && is_object_v<Pred>
18981ad6265SDimitry Andric  class filter_view;
19081ad6265SDimitry Andric
19181ad6265SDimitry Andric  namespace views {
19281ad6265SDimitry Andric    inline constexpr unspecified filter = unspecified;
19381ad6265SDimitry Andric  }
19481ad6265SDimitry Andric
195fe6060f1SDimitry Andric  // [range.drop], drop view
196fe6060f1SDimitry Andric  template<view V>
197fe6060f1SDimitry Andric    class drop_view;
198fe6060f1SDimitry Andric
199fe6060f1SDimitry Andric  template<class T>
200fe6060f1SDimitry Andric    inline constexpr bool enable_borrowed_range<drop_view<T>> = enable_borrowed_range<T>;
201fe6060f1SDimitry Andric
202bdd1243dSDimitry Andric  // [range.drop.while], drop while view
203bdd1243dSDimitry Andric  template<view V, class Pred>
204bdd1243dSDimitry Andric    requires input_range<V> && is_object_v<Pred> &&
205bdd1243dSDimitry Andric             indirect_unary_predicate<const Pred, iterator_t<V>>
206bdd1243dSDimitry Andric    class drop_while_view;
207bdd1243dSDimitry Andric
208bdd1243dSDimitry Andric  template<class T, class Pred>
209bdd1243dSDimitry Andric    inline constexpr bool enable_borrowed_range<drop_while_view<T, Pred>> =
210bdd1243dSDimitry Andric      enable_borrowed_range<T>;
211bdd1243dSDimitry Andric
212bdd1243dSDimitry Andric  namespace views { inline constexpr unspecified drop_while = unspecified; }
213bdd1243dSDimitry Andric
214fe6060f1SDimitry Andric  // [range.transform], transform view
215fe6060f1SDimitry Andric  template<input_range V, copy_constructible F>
216fe6060f1SDimitry Andric    requires view<V> && is_object_v<F> &&
217fe6060f1SDimitry Andric             regular_invocable<F&, range_reference_t<V>> &&
218fe6060f1SDimitry Andric             can-reference<invoke_result_t<F&, range_reference_t<V>>>
219fe6060f1SDimitry Andric  class transform_view;
220fe6060f1SDimitry Andric
221349cc55cSDimitry Andric  // [range.counted], counted view
222349cc55cSDimitry Andric  namespace views { inline constexpr unspecified counted = unspecified; }
223349cc55cSDimitry Andric
224fe6060f1SDimitry Andric  // [range.common], common view
225fe6060f1SDimitry Andric  template<view V>
226fe6060f1SDimitry Andric    requires (!common_range<V> && copyable<iterator_t<V>>)
227fe6060f1SDimitry Andric  class common_view;
228fe6060f1SDimitry Andric
229349cc55cSDimitry Andric // [range.reverse], reverse view
230349cc55cSDimitry Andric  template<view V>
231349cc55cSDimitry Andric    requires bidirectional_range<V>
232349cc55cSDimitry Andric  class reverse_view;
233349cc55cSDimitry Andric
234349cc55cSDimitry Andric  template<class T>
235349cc55cSDimitry Andric    inline constexpr bool enable_borrowed_range<reverse_view<T>> = enable_borrowed_range<T>;
236349cc55cSDimitry Andric
237fe6060f1SDimitry Andric  template<class T>
238fe6060f1SDimitry Andric  inline constexpr bool enable_borrowed_range<common_view<T>> = enable_borrowed_range<T>;
239349cc55cSDimitry Andric
240349cc55cSDimitry Andric   // [range.take], take view
241349cc55cSDimitry Andric  template<view> class take_view;
242349cc55cSDimitry Andric
243349cc55cSDimitry Andric  template<class T>
244349cc55cSDimitry Andric  inline constexpr bool enable_borrowed_range<take_view<T>> = enable_borrowed_range<T>;
245349cc55cSDimitry Andric
246bdd1243dSDimitry Andric    // [range.take.while], take while view
247bdd1243dSDimitry Andric  template<view V, class Pred>
248bdd1243dSDimitry Andric    requires input_range<V> && is_object_v<Pred> &&
249bdd1243dSDimitry Andric             indirect_unary_predicate<const Pred, iterator_t<V>>
250bdd1243dSDimitry Andric    class take_while_view;
251bdd1243dSDimitry Andric
252bdd1243dSDimitry Andric  namespace views { inline constexpr unspecified take_while = unspecified; }
253bdd1243dSDimitry Andric
254349cc55cSDimitry Andric  template<copy_constructible T>
255349cc55cSDimitry Andric    requires is_object_v<T>
256349cc55cSDimitry Andric  class single_view;
257349cc55cSDimitry Andric
258349cc55cSDimitry Andric  template<weakly_incrementable W, semiregular Bound = unreachable_sentinel_t>
259349cc55cSDimitry Andric    requires weakly-equality-comparable-with<W, Bound> && copyable<W>
260349cc55cSDimitry Andric  class iota_view;
261349cc55cSDimitry Andric
262349cc55cSDimitry Andric  template<class W, class Bound>
263349cc55cSDimitry Andric    inline constexpr bool enable_borrowed_range<iota_view<W, Bound>> = true;
264349cc55cSDimitry Andric
265*06c3fb27SDimitry Andric  // [range.repeat], repeat view
266*06c3fb27SDimitry Andric  template<class T>
267*06c3fb27SDimitry Andric    concept integer-like-with-usable-difference-type =  // exposition only
268*06c3fb27SDimitry Andric      is-signed-integer-like<T> || (is-integer-like<T> && weakly_incrementable<T>);
269*06c3fb27SDimitry Andric
270*06c3fb27SDimitry Andric  template<move_constructible T, semiregular Bound = unreachable_sentinel_t>
271*06c3fb27SDimitry Andric    requires (is_object_v<T> && same_as<T, remove_cv_t<T>> &&
272*06c3fb27SDimitry Andric              (integer-like-with-usable-difference-type<Bound> ||
273*06c3fb27SDimitry Andric               same_as<Bound, unreachable_sentinel_t>))
274*06c3fb27SDimitry Andric  class repeat_view;
275*06c3fb27SDimitry Andric
276*06c3fb27SDimitry Andric  namespace views { inline constexpr unspecified repeat = unspecified; }
277*06c3fb27SDimitry Andric
278349cc55cSDimitry Andric  // [range.join], join view
279349cc55cSDimitry Andric  template<input_range V>
280349cc55cSDimitry Andric    requires view<V> && input_range<range_reference_t<V>>
281349cc55cSDimitry Andric  class join_view;
28281ad6265SDimitry Andric
28381ad6265SDimitry Andric  // [range.lazy.split], lazy split view
28481ad6265SDimitry Andric  template<class R>
28581ad6265SDimitry Andric    concept tiny-range = see below;   // exposition only
28681ad6265SDimitry Andric
28781ad6265SDimitry Andric  template<input_range V, forward_range Pattern>
28881ad6265SDimitry Andric    requires view<V> && view<Pattern> &&
28981ad6265SDimitry Andric             indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> &&
29081ad6265SDimitry Andric             (forward_range<V> || tiny-range<Pattern>)
29181ad6265SDimitry Andric  class lazy_split_view;
29281ad6265SDimitry Andric
293bdd1243dSDimitry Andric  // [range.split], split view
294bdd1243dSDimitry Andric  template<forward_range V, forward_range Pattern>
295bdd1243dSDimitry Andric    requires view<V> && view<Pattern> &&
296bdd1243dSDimitry Andric             indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>
297bdd1243dSDimitry Andric  class split_view;
298bdd1243dSDimitry Andric
29981ad6265SDimitry Andric  namespace views {
30081ad6265SDimitry Andric    inline constexpr unspecified lazy_split = unspecified;
301bdd1243dSDimitry Andric    inline constexpr unspecified split = unspecified;
302fe6060f1SDimitry Andric  }
303fe6060f1SDimitry Andric
304bdd1243dSDimitry Andric  // [range.istream], istream view
305bdd1243dSDimitry Andric  template<movable Val, class CharT, class Traits = char_traits<CharT>>
306bdd1243dSDimitry Andric    requires see below
307bdd1243dSDimitry Andric  class basic_istream_view;
308bdd1243dSDimitry Andric
309bdd1243dSDimitry Andric  template<class Val>
310bdd1243dSDimitry Andric    using istream_view = basic_istream_view<Val, char>;
311bdd1243dSDimitry Andric
312bdd1243dSDimitry Andric  template<class Val>
313bdd1243dSDimitry Andric    using wistream_view = basic_istream_view<Val, wchar_t>;
314bdd1243dSDimitry Andric
315bdd1243dSDimitry Andric  namespace views { template<class T> inline constexpr unspecified istream = unspecified; }
316bdd1243dSDimitry Andric
31781ad6265SDimitry Andric  // [range.zip], zip view
31881ad6265SDimitry Andric  template<input_range... Views>
31981ad6265SDimitry Andric    requires (view<Views> && ...) && (sizeof...(Views) > 0)
320*06c3fb27SDimitry Andric  class zip_view;        // C++23
32181ad6265SDimitry Andric
32281ad6265SDimitry Andric  template<class... Views>
323*06c3fb27SDimitry Andric    inline constexpr bool enable_borrowed_range<zip_view<Views...>> =    // C++23
32481ad6265SDimitry Andric      (enable_borrowed_range<Views> && ...);
32581ad6265SDimitry Andric
326*06c3fb27SDimitry Andric  namespace views { inline constexpr unspecified zip = unspecified; }    // C++23
327bdd1243dSDimitry Andric
328bdd1243dSDimitry Andric  // [range.as.rvalue]
329bdd1243dSDimitry Andric  template <view V>
330bdd1243dSDimitry Andric    requires input_range<V>
331bdd1243dSDimitry Andric  class as_rvalue_view; // since C++23
332bdd1243dSDimitry Andric
333bdd1243dSDimitry Andric  namespace views { inline constexpr unspecified as_rvalue ) unspecified; } // since C++23
33481ad6265SDimitry Andric}
33581ad6265SDimitry Andric
33681ad6265SDimitry Andricnamespace std {
33781ad6265SDimitry Andric  namespace views = ranges::views;
33881ad6265SDimitry Andric
33981ad6265SDimitry Andric  template<class T> struct tuple_size;
34081ad6265SDimitry Andric  template<size_t I, class T> struct tuple_element;
34181ad6265SDimitry Andric
34281ad6265SDimitry Andric  template<class I, class S, ranges::subrange_kind K>
34381ad6265SDimitry Andric  struct tuple_size<ranges::subrange<I, S, K>>
34481ad6265SDimitry Andric    : integral_constant<size_t, 2> {};
34581ad6265SDimitry Andric
34681ad6265SDimitry Andric  template<class I, class S, ranges::subrange_kind K>
34781ad6265SDimitry Andric  struct tuple_element<0, ranges::subrange<I, S, K>> {
34881ad6265SDimitry Andric    using type = I;
34981ad6265SDimitry Andric  };
35081ad6265SDimitry Andric
35181ad6265SDimitry Andric  template<class I, class S, ranges::subrange_kind K>
35281ad6265SDimitry Andric  struct tuple_element<1, ranges::subrange<I, S, K>> {
35381ad6265SDimitry Andric    using type = S;
35481ad6265SDimitry Andric  };
35581ad6265SDimitry Andric
35681ad6265SDimitry Andric  template<class I, class S, ranges::subrange_kind K>
35781ad6265SDimitry Andric  struct tuple_element<0, const ranges::subrange<I, S, K>> {
35881ad6265SDimitry Andric    using type = I;
35981ad6265SDimitry Andric  };
36081ad6265SDimitry Andric
36181ad6265SDimitry Andric  template<class I, class S, ranges::subrange_kind K>
36281ad6265SDimitry Andric  struct tuple_element<1, const ranges::subrange<I, S, K>> {
36381ad6265SDimitry Andric    using type = S;
36481ad6265SDimitry Andric  };
365*06c3fb27SDimitry Andric
366*06c3fb27SDimitry Andric  struct from_range_t { explicit from_range_t() = default; };  // Since C++23
367*06c3fb27SDimitry Andric  inline constexpr from_range_t from_range{};                  // Since C++23
36881ad6265SDimitry Andric}
369fe6060f1SDimitry Andric*/
370fe6060f1SDimitry Andric
37181ad6265SDimitry Andric#include <__assert> // all public C++ headers provide the assertion handler
372fe6060f1SDimitry Andric#include <__config>
373fe6060f1SDimitry Andric#include <__ranges/access.h>
374fe6060f1SDimitry Andric#include <__ranges/all.h>
375bdd1243dSDimitry Andric#include <__ranges/as_rvalue_view.h>
376fe6060f1SDimitry Andric#include <__ranges/common_view.h>
377fe6060f1SDimitry Andric#include <__ranges/concepts.h>
378349cc55cSDimitry Andric#include <__ranges/counted.h>
379fe6060f1SDimitry Andric#include <__ranges/dangling.h>
380fe6060f1SDimitry Andric#include <__ranges/data.h>
381fe6060f1SDimitry Andric#include <__ranges/drop_view.h>
382bdd1243dSDimitry Andric#include <__ranges/drop_while_view.h>
383bdd1243dSDimitry Andric#include <__ranges/elements_view.h>
384349cc55cSDimitry Andric#include <__ranges/empty.h>
38504eeddc0SDimitry Andric#include <__ranges/empty_view.h>
386fe6060f1SDimitry Andric#include <__ranges/enable_borrowed_range.h>
387fe6060f1SDimitry Andric#include <__ranges/enable_view.h>
38881ad6265SDimitry Andric#include <__ranges/filter_view.h>
389*06c3fb27SDimitry Andric#include <__ranges/from_range.h>
390349cc55cSDimitry Andric#include <__ranges/iota_view.h>
391349cc55cSDimitry Andric#include <__ranges/join_view.h>
39281ad6265SDimitry Andric#include <__ranges/lazy_split_view.h>
39381ad6265SDimitry Andric#include <__ranges/rbegin.h>
394fe6060f1SDimitry Andric#include <__ranges/ref_view.h>
39581ad6265SDimitry Andric#include <__ranges/rend.h>
396*06c3fb27SDimitry Andric#include <__ranges/repeat_view.h>
397349cc55cSDimitry Andric#include <__ranges/reverse_view.h>
398349cc55cSDimitry Andric#include <__ranges/single_view.h>
399fe6060f1SDimitry Andric#include <__ranges/size.h>
400bdd1243dSDimitry Andric#include <__ranges/split_view.h>
401fe6060f1SDimitry Andric#include <__ranges/subrange.h>
402349cc55cSDimitry Andric#include <__ranges/take_view.h>
403bdd1243dSDimitry Andric#include <__ranges/take_while_view.h>
404*06c3fb27SDimitry Andric#include <__ranges/to.h>
405fe6060f1SDimitry Andric#include <__ranges/transform_view.h>
406fe6060f1SDimitry Andric#include <__ranges/view_interface.h>
40753683b95SDimitry Andric#include <__ranges/views.h>
40881ad6265SDimitry Andric#include <__ranges/zip_view.h>
409d56accc7SDimitry Andric#include <version>
410fe6060f1SDimitry Andric
411bdd1243dSDimitry Andric#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
412bdd1243dSDimitry Andric#include <__ranges/istream_view.h>
413bdd1243dSDimitry Andric#endif
414bdd1243dSDimitry Andric
415bdd1243dSDimitry Andric// standard-mandated includes
416bdd1243dSDimitry Andric
417bdd1243dSDimitry Andric// [ranges.syn]
418bdd1243dSDimitry Andric#include <compare>
419bdd1243dSDimitry Andric#include <initializer_list>
420bdd1243dSDimitry Andric#include <iterator>
421bdd1243dSDimitry Andric
422bdd1243dSDimitry Andric// [tuple.helper]
423*06c3fb27SDimitry Andric#include <__tuple/tuple_element.h>
424*06c3fb27SDimitry Andric#include <__tuple/tuple_size.h>
425bdd1243dSDimitry Andric
426fe6060f1SDimitry Andric#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
427fe6060f1SDimitry Andric#  pragma GCC system_header
428fe6060f1SDimitry Andric#endif
429fe6060f1SDimitry Andric
430*06c3fb27SDimitry Andric#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
431*06c3fb27SDimitry Andric#  include <cstdlib>
432*06c3fb27SDimitry Andric#  include <type_traits>
433*06c3fb27SDimitry Andric#endif
434*06c3fb27SDimitry Andric
435fe6060f1SDimitry Andric#endif // _LIBCPP_RANGES
436