xref: /freebsd/contrib/llvm-project/libcxx/modules/std/iterator.inc (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1// -*- C++ -*-
2//===----------------------------------------------------------------------===//
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
10export namespace std {
11  // [iterator.assoc.types], associated types
12  // [incrementable.traits], incrementable traits
13  using std::incrementable_traits;
14  using std::iter_difference_t;
15
16  using std::indirectly_readable_traits;
17  using std::iter_value_t;
18
19  // [iterator.traits], iterator traits
20  using std::iterator_traits;
21
22  using std::iter_reference_t;
23
24  namespace ranges {
25    // [iterator.cust], customization point objects
26    inline namespace __cpo {
27      // [iterator.cust.move], ranges::iter_move
28      using std::ranges::__cpo::iter_move;
29
30      // [iterator.cust.swap], ranges::iter_swap
31      using std::ranges::__cpo::iter_swap;
32    } // namespace __cpo
33  }   // namespace ranges
34
35  using std::iter_rvalue_reference_t;
36
37  // [iterator.concepts], iterator concepts
38  // [iterator.concept.readable], concept indirectly_readable
39  using std::indirectly_readable;
40
41  using std::iter_common_reference_t;
42
43  // [iterator.concept.writable], concept indirectly_writable
44  using std::indirectly_writable;
45
46  // [iterator.concept.winc], concept weakly_incrementable
47  using std::weakly_incrementable;
48
49  // [iterator.concept.inc], concept incrementable
50  using std::incrementable;
51
52  // [iterator.concept.iterator], concept input_or_output_iterator
53  using std::input_or_output_iterator;
54
55  // [iterator.concept.sentinel], concept sentinel_for
56  using std::sentinel_for;
57
58  // [iterator.concept.sizedsentinel], concept sized_sentinel_for
59  using std::disable_sized_sentinel_for;
60
61  using std::sized_sentinel_for;
62
63  // [iterator.concept.input], concept input_iterator
64  using std::input_iterator;
65
66  // [iterator.concept.output], concept output_iterator
67  using std::output_iterator;
68
69  // [iterator.concept.forward], concept forward_iterator
70  using std::forward_iterator;
71
72  // [iterator.concept.bidir], concept bidirectional_iterator
73  using std::bidirectional_iterator;
74
75  // [iterator.concept.random.access], concept random_access_iterator
76  using std::random_access_iterator;
77
78  // [iterator.concept.contiguous], concept contiguous_iterator
79  using std::contiguous_iterator;
80
81  // [indirectcallable], indirect callable requirements
82  // [indirectcallable.indirectinvocable], indirect callables
83  using std::indirectly_unary_invocable;
84
85  using std::indirectly_regular_unary_invocable;
86
87  using std::indirect_unary_predicate;
88
89  using std::indirect_binary_predicate;
90
91  using std::indirect_equivalence_relation;
92
93  using std::indirect_strict_weak_order;
94
95  using std::indirect_result_t;
96
97  // [projected], projected
98  using std::projected;
99
100  // [alg.req], common algorithm requirements
101  // [alg.req.ind.move], concept indirectly_movable
102  using std::indirectly_movable;
103
104  using std::indirectly_movable_storable;
105
106  // [alg.req.ind.copy], concept indirectly_copyable
107  using std::indirectly_copyable;
108
109  using std::indirectly_copyable_storable;
110
111  // [alg.req.ind.swap], concept indirectly_swappable
112  using std::indirectly_swappable;
113
114  // [alg.req.ind.cmp], concept indirectly_comparable
115  using std::indirectly_comparable;
116
117  // [alg.req.permutable], concept permutable
118  using std::permutable;
119
120  // [alg.req.mergeable], concept mergeable
121  using std::mergeable;
122
123  // [alg.req.sortable], concept sortable
124  using std::sortable;
125
126  // [iterator.primitives], primitives
127  // [std.iterator.tags], iterator tags
128  using std::bidirectional_iterator_tag;
129  using std::contiguous_iterator_tag;
130  using std::forward_iterator_tag;
131  using std::input_iterator_tag;
132  using std::output_iterator_tag;
133  using std::random_access_iterator_tag;
134
135  // [iterator.operations], iterator operations
136  using std::advance;
137  using std::distance;
138  using std::next;
139  using std::prev;
140
141  // [range.iter.ops], range iterator operations
142  namespace ranges {
143    // [range.iter.op.advance], ranges​::​advance
144    using std::ranges::advance;
145
146    // [range.iter.op.distance], ranges​::​distance
147    using std::ranges::distance;
148
149    // [range.iter.op.next], ranges​::​next
150    using std::ranges::next;
151
152    // [range.iter.op.prev], ranges​::​prev
153    using std::ranges::prev;
154  } // namespace ranges
155
156  // [predef.iterators], predefined iterators and sentinels
157  // [reverse.iterators], reverse iterators
158  using std::reverse_iterator;
159
160  using std::operator==;
161  using std::operator!=;
162  using std::operator<;
163  using std::operator>;
164  using std::operator<=;
165  using std::operator>=;
166  using std::operator<=>;
167
168  using std::operator-;
169  using std::operator+;
170
171  using std::make_reverse_iterator;
172
173  // using std::disable_sized_sentinel_for;
174
175  // [insert.iterators], insert iterators
176  using std::back_insert_iterator;
177  using std::back_inserter;
178
179  using std::front_insert_iterator;
180  using std::front_inserter;
181
182  using std::insert_iterator;
183  using std::inserter;
184
185  // [const.iterators], constant iterators and sentinels
186  // [const.iterators.alias], alias templates
187  //  using std::const_iterator;
188  //  using std::const_sentinel;
189  //  using std::iter_const_reference_t;
190
191  // [const.iterators.iterator], class template basic_const_iterator
192  //  using std::basic_const_iterator;
193
194  // using std::common_type;
195
196  //  using std::make_const_iterator;
197
198  // [move.iterators], move iterators and sentinels
199  using std::move_iterator;
200
201  using std::make_move_iterator;
202
203  using std::move_sentinel;
204
205  using std::common_iterator;
206
207  // [default.sentinel], default sentinel
208  using std::default_sentinel;
209  using std::default_sentinel_t;
210
211  // [iterators.counted], counted iterators
212  using std::counted_iterator;
213
214  // [unreachable.sentinel], unreachable sentinel
215  using std::unreachable_sentinel;
216  using std::unreachable_sentinel_t;
217
218  // [stream.iterators], stream iterators
219  using std::istream_iterator;
220
221  using std::ostream_iterator;
222
223  using std::istreambuf_iterator;
224  using std::ostreambuf_iterator;
225
226  // [iterator.range], range access
227  using std::begin;
228  using std::cbegin;
229  using std::cend;
230  using std::crbegin;
231  using std::crend;
232  using std::end;
233  using std::rbegin;
234  using std::rend;
235
236  using std::empty;
237  using std::size;
238  using std::ssize;
239
240  using std::data;
241
242  // [depr.iterator]
243  using std::iterator;
244} // namespace std
245