2 //===----------------------------------------------------------------------===//
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
8 //===----------------------------------------------------------------------===//
10 export namespace std {
12 inline namespace __cpo {
13 // [range.access], range access
14 using std::ranges::__cpo::begin;
15 using std::ranges::__cpo::cbegin;
16 using std::ranges::__cpo::cend;
17 using std::ranges::__cpo::crbegin;
18 using std::ranges::__cpo::crend;
19 using std::ranges::__cpo::end;
20 using std::ranges::__cpo::rbegin;
21 using std::ranges::__cpo::rend;
23 using std::ranges::__cpo::cdata;
24 using std::ranges::__cpo::data;
25 using std::ranges::__cpo::empty;
26 using std::ranges::__cpo::size;
27 using std::ranges::__cpo::ssize;
30 // [range.range], ranges
31 using std::ranges::range;
33 using std::ranges::enable_borrowed_range;
35 using std::ranges::borrowed_range;
37 // using std::ranges::const_iterator_t;
38 // using std::ranges::const_sentinel_t;
39 using std::ranges::iterator_t;
40 // using std::ranges::range_const_reference_t;
41 using std::ranges::range_common_reference_t;
42 using std::ranges::range_difference_t;
43 using std::ranges::range_reference_t;
44 using std::ranges::range_rvalue_reference_t;
45 using std::ranges::range_size_t;
46 using std::ranges::range_value_t;
47 using std::ranges::sentinel_t;
49 // [range.sized], sized ranges
50 using std::ranges::disable_sized_range;
51 using std::ranges::sized_range;
53 // [range.view], views
54 using std::ranges::enable_view;
55 using std::ranges::view;
56 using std::ranges::view_base;
58 // [range.refinements], other range refinements
59 using std::ranges::bidirectional_range;
60 using std::ranges::common_range;
61 // using std::ranges::constant_range;
62 using std::ranges::contiguous_range;
63 using std::ranges::forward_range;
64 using std::ranges::input_range;
65 using std::ranges::output_range;
66 using std::ranges::random_access_range;
67 using std::ranges::viewable_range;
69 // [view.interface], class template view_interface
70 using std::ranges::view_interface;
72 // [range.subrange], sub-ranges
73 using std::ranges::subrange;
74 using std::ranges::subrange_kind;
76 using std::ranges::get;
79 using std::ranges::get;
83 // [range.dangling], dangling iterator handling
84 using std::ranges::dangling;
86 // [range.elementsof], class template elements_of
87 // using std::ranges::elements_of;
89 using std::ranges::borrowed_iterator_t;
91 using std::ranges::borrowed_subrange_t;
93 #if _LIBCPP_STD_VER >= 23
94 // [range.utility.conv], range conversions
95 using std::ranges::to;
98 // [range.empty], empty view
99 using std::ranges::empty_view;
102 using std::ranges::views::empty;
105 // [range.single], single view
106 using std::ranges::single_view;
109 using std::ranges::views::single;
112 // [range.iota], iota view
113 using std::ranges::iota_view;
116 using std::ranges::views::iota;
119 #if _LIBCPP_STD_VER >= 23
120 // [range.repeat], repeat view
121 using std::ranges::repeat_view;
124 using std::ranges::views::repeat;
126 #endif // _LIBCPP_STD_VER >= 23
128 #ifndef _LIBCPP_HAS_NO_LOCALIZATION
129 // [range.istream], istream view
130 using std::ranges::basic_istream_view;
131 using std::ranges::istream_view;
132 # ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
133 using std::ranges::wistream_view;
137 using std::ranges::views::istream;
139 #endif // _LIBCPP_HAS_NO_LOCALIZATION
141 // [range.adaptor.object], range adaptor objects
142 // using std::ranges::range_adaptor_closure;
144 // [range.all], all view
146 using std::ranges::views::all;
147 using std::ranges::views::all_t;
150 // [range.ref.view], ref view
151 using std::ranges::ref_view;
153 // [range.owning.view], owning view
154 using std::ranges::owning_view;
156 #if _LIBCPP_STD_VER >= 23
157 // [range.as.rvalue], as rvalue view
158 using std::ranges::as_rvalue_view;
161 using std::ranges::views::as_rvalue;
163 #endif // _LIBCPP_STD_VER >= 23
165 // [range.filter], filter view
166 using std::ranges::filter_view;
169 using std::ranges::views::filter;
172 // [range.transform], transform view
173 using std::ranges::transform_view;
176 using std::ranges::views::transform;
179 // [range.take], take view
180 using std::ranges::take_view;
183 using std::ranges::views::take;
186 // [range.take.while], take while view
187 using std::ranges::take_while_view;
190 using std::ranges::views::take_while;
193 // [range.drop], drop view
194 using std::ranges::drop_view;
197 using std::ranges::views::drop;
200 // [range.drop.while], drop while view
201 using std::ranges::drop_while_view;
204 using std::ranges::views::drop_while;
207 #ifdef _LIBCPP_ENABLE_EXPERIMENTAL
208 using std::ranges::join_view;
211 using std::ranges::views::join;
213 #endif // _LIBCPP_ENABLE_EXPERIMENTAL
215 using std::ranges::join_with_view;
218 using std::ranges::views::join_with;
221 using std::ranges::lazy_split_view;
223 // [range.split], split view
224 using std::ranges::split_view;
227 using std::ranges::views::lazy_split;
228 using std::ranges::views::split;
231 // [range.counted], counted view
233 using std::ranges::views::counted;
236 // [range.common], common view
237 using std::ranges::common_view;
240 using std::ranges::views::common;
243 // [range.reverse], reverse view
244 using std::ranges::reverse_view;
247 using std::ranges::views::reverse;
250 // [range.as.const], as const view
252 using std::ranges::as_const_view;
255 using std::ranges::views::as_const;
258 // [range.elements], elements view
259 using std::ranges::elements_view;
261 using std::ranges::keys_view;
262 using std::ranges::values_view;
265 using std::ranges::views::elements;
266 using std::ranges::views::keys;
267 using std::ranges::views::values;
270 #if _LIBCPP_STD_VER >= 23
271 // [range.zip], zip view
272 using std::ranges::zip_view;
275 using std::ranges::views::zip;
277 #endif // _LIBCPP_STD_VER >= 23
280 // [range.zip.transform], zip transform view
281 using std::ranges::zip_transform_view;
284 using std::ranges::views::zip_transform;
287 using std::ranges::adjacent_view;
290 using std::ranges::views::adjacent;
291 using std::ranges::views::pairwise;
294 using std::ranges::adjacent_transform_view;
297 using std::ranges::views::adjacent_transform;
298 using std::ranges::views::pairwise_transform;
301 using std::ranges::chunk_view;
303 using std::ranges::chunk_view<V>;
306 using std::ranges::views::chunk;
309 using std::ranges::slide_view;
312 using std::ranges::views::slide;
316 #if _LIBCPP_STD_VER >= 23
317 // [range.chunk.by], chunk by view
318 using std::ranges::chunk_by_view;
321 using std::ranges::views::chunk_by;
323 #endif // _LIBCPP_STD_VER >= 23
326 // [range.stride], stride view
327 using std::ranges::stride_view;
330 using std::ranges::views::stride;
333 using std::ranges::cartesian_product_view;
336 using std::ranges::views::cartesian_product;
339 } // namespace ranges
341 namespace views = ranges::views;
343 using std::tuple_element;
344 using std::tuple_size;
346 #if _LIBCPP_STD_VER >= 23
347 using std::from_range;
348 using std::from_range_t;
349 #endif // _LIBCPP_STD_VER >= 23