1 | //===----------------------------------------------------------------------===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | // WARNING: This test was generated by generate_feature_test_macro_components.py |
10 | // and should not be edited manually. |
11 | |
12 | // <iterator> |
13 | |
14 | // Test the feature test macros defined by <iterator> |
15 | |
16 | // clang-format off |
17 | |
18 | #include <iterator> |
19 | #include "test_macros.h" |
20 | |
21 | #if TEST_STD_VER < 14 |
22 | |
23 | # ifdef __cpp_lib_array_constexpr |
24 | # error "__cpp_lib_array_constexpr should not be defined before c++17" |
25 | # endif |
26 | |
27 | # ifdef __cpp_lib_constexpr_iterator |
28 | # error "__cpp_lib_constexpr_iterator should not be defined before c++20" |
29 | # endif |
30 | |
31 | # ifdef __cpp_lib_make_reverse_iterator |
32 | # error "__cpp_lib_make_reverse_iterator should not be defined before c++14" |
33 | # endif |
34 | |
35 | # ifdef __cpp_lib_move_iterator_concept |
36 | # error "__cpp_lib_move_iterator_concept should not be defined before c++20" |
37 | # endif |
38 | |
39 | # ifdef __cpp_lib_nonmember_container_access |
40 | # error "__cpp_lib_nonmember_container_access should not be defined before c++17" |
41 | # endif |
42 | |
43 | # ifdef __cpp_lib_null_iterators |
44 | # error "__cpp_lib_null_iterators should not be defined before c++14" |
45 | # endif |
46 | |
47 | # ifdef __cpp_lib_ranges |
48 | # error "__cpp_lib_ranges should not be defined before c++20" |
49 | # endif |
50 | |
51 | # ifdef __cpp_lib_ssize |
52 | # error "__cpp_lib_ssize should not be defined before c++20" |
53 | # endif |
54 | |
55 | #elif TEST_STD_VER == 14 |
56 | |
57 | # ifdef __cpp_lib_array_constexpr |
58 | # error "__cpp_lib_array_constexpr should not be defined before c++17" |
59 | # endif |
60 | |
61 | # ifdef __cpp_lib_constexpr_iterator |
62 | # error "__cpp_lib_constexpr_iterator should not be defined before c++20" |
63 | # endif |
64 | |
65 | # ifndef __cpp_lib_make_reverse_iterator |
66 | # error "__cpp_lib_make_reverse_iterator should be defined in c++14" |
67 | # endif |
68 | # if __cpp_lib_make_reverse_iterator != 201402L |
69 | # error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++14" |
70 | # endif |
71 | |
72 | # ifdef __cpp_lib_move_iterator_concept |
73 | # error "__cpp_lib_move_iterator_concept should not be defined before c++20" |
74 | # endif |
75 | |
76 | # ifdef __cpp_lib_nonmember_container_access |
77 | # error "__cpp_lib_nonmember_container_access should not be defined before c++17" |
78 | # endif |
79 | |
80 | # ifndef __cpp_lib_null_iterators |
81 | # error "__cpp_lib_null_iterators should be defined in c++14" |
82 | # endif |
83 | # if __cpp_lib_null_iterators != 201304L |
84 | # error "__cpp_lib_null_iterators should have the value 201304L in c++14" |
85 | # endif |
86 | |
87 | # ifdef __cpp_lib_ranges |
88 | # error "__cpp_lib_ranges should not be defined before c++20" |
89 | # endif |
90 | |
91 | # ifdef __cpp_lib_ssize |
92 | # error "__cpp_lib_ssize should not be defined before c++20" |
93 | # endif |
94 | |
95 | #elif TEST_STD_VER == 17 |
96 | |
97 | # ifndef __cpp_lib_array_constexpr |
98 | # error "__cpp_lib_array_constexpr should be defined in c++17" |
99 | # endif |
100 | # if __cpp_lib_array_constexpr != 201603L |
101 | # error "__cpp_lib_array_constexpr should have the value 201603L in c++17" |
102 | # endif |
103 | |
104 | # ifdef __cpp_lib_constexpr_iterator |
105 | # error "__cpp_lib_constexpr_iterator should not be defined before c++20" |
106 | # endif |
107 | |
108 | # ifndef __cpp_lib_make_reverse_iterator |
109 | # error "__cpp_lib_make_reverse_iterator should be defined in c++17" |
110 | # endif |
111 | # if __cpp_lib_make_reverse_iterator != 201402L |
112 | # error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++17" |
113 | # endif |
114 | |
115 | # ifdef __cpp_lib_move_iterator_concept |
116 | # error "__cpp_lib_move_iterator_concept should not be defined before c++20" |
117 | # endif |
118 | |
119 | # ifndef __cpp_lib_nonmember_container_access |
120 | # error "__cpp_lib_nonmember_container_access should be defined in c++17" |
121 | # endif |
122 | # if __cpp_lib_nonmember_container_access != 201411L |
123 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" |
124 | # endif |
125 | |
126 | # ifndef __cpp_lib_null_iterators |
127 | # error "__cpp_lib_null_iterators should be defined in c++17" |
128 | # endif |
129 | # if __cpp_lib_null_iterators != 201304L |
130 | # error "__cpp_lib_null_iterators should have the value 201304L in c++17" |
131 | # endif |
132 | |
133 | # ifdef __cpp_lib_ranges |
134 | # error "__cpp_lib_ranges should not be defined before c++20" |
135 | # endif |
136 | |
137 | # ifdef __cpp_lib_ssize |
138 | # error "__cpp_lib_ssize should not be defined before c++20" |
139 | # endif |
140 | |
141 | #elif TEST_STD_VER == 20 |
142 | |
143 | # ifndef __cpp_lib_array_constexpr |
144 | # error "__cpp_lib_array_constexpr should be defined in c++20" |
145 | # endif |
146 | # if __cpp_lib_array_constexpr != 201811L |
147 | # error "__cpp_lib_array_constexpr should have the value 201811L in c++20" |
148 | # endif |
149 | |
150 | # ifndef __cpp_lib_constexpr_iterator |
151 | # error "__cpp_lib_constexpr_iterator should be defined in c++20" |
152 | # endif |
153 | # if __cpp_lib_constexpr_iterator != 201811L |
154 | # error "__cpp_lib_constexpr_iterator should have the value 201811L in c++20" |
155 | # endif |
156 | |
157 | # ifndef __cpp_lib_make_reverse_iterator |
158 | # error "__cpp_lib_make_reverse_iterator should be defined in c++20" |
159 | # endif |
160 | # if __cpp_lib_make_reverse_iterator != 201402L |
161 | # error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++20" |
162 | # endif |
163 | |
164 | # ifndef __cpp_lib_move_iterator_concept |
165 | # error "__cpp_lib_move_iterator_concept should be defined in c++20" |
166 | # endif |
167 | # if __cpp_lib_move_iterator_concept != 202207L |
168 | # error "__cpp_lib_move_iterator_concept should have the value 202207L in c++20" |
169 | # endif |
170 | |
171 | # ifndef __cpp_lib_nonmember_container_access |
172 | # error "__cpp_lib_nonmember_container_access should be defined in c++20" |
173 | # endif |
174 | # if __cpp_lib_nonmember_container_access != 201411L |
175 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" |
176 | # endif |
177 | |
178 | # ifndef __cpp_lib_null_iterators |
179 | # error "__cpp_lib_null_iterators should be defined in c++20" |
180 | # endif |
181 | # if __cpp_lib_null_iterators != 201304L |
182 | # error "__cpp_lib_null_iterators should have the value 201304L in c++20" |
183 | # endif |
184 | |
185 | # ifndef __cpp_lib_ranges |
186 | # error "__cpp_lib_ranges should be defined in c++20" |
187 | # endif |
188 | # if __cpp_lib_ranges != 202110L |
189 | # error "__cpp_lib_ranges should have the value 202110L in c++20" |
190 | # endif |
191 | |
192 | # ifndef __cpp_lib_ssize |
193 | # error "__cpp_lib_ssize should be defined in c++20" |
194 | # endif |
195 | # if __cpp_lib_ssize != 201902L |
196 | # error "__cpp_lib_ssize should have the value 201902L in c++20" |
197 | # endif |
198 | |
199 | #elif TEST_STD_VER == 23 |
200 | |
201 | # ifndef __cpp_lib_array_constexpr |
202 | # error "__cpp_lib_array_constexpr should be defined in c++23" |
203 | # endif |
204 | # if __cpp_lib_array_constexpr != 201811L |
205 | # error "__cpp_lib_array_constexpr should have the value 201811L in c++23" |
206 | # endif |
207 | |
208 | # ifndef __cpp_lib_constexpr_iterator |
209 | # error "__cpp_lib_constexpr_iterator should be defined in c++23" |
210 | # endif |
211 | # if __cpp_lib_constexpr_iterator != 201811L |
212 | # error "__cpp_lib_constexpr_iterator should have the value 201811L in c++23" |
213 | # endif |
214 | |
215 | # ifndef __cpp_lib_make_reverse_iterator |
216 | # error "__cpp_lib_make_reverse_iterator should be defined in c++23" |
217 | # endif |
218 | # if __cpp_lib_make_reverse_iterator != 201402L |
219 | # error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++23" |
220 | # endif |
221 | |
222 | # ifndef __cpp_lib_move_iterator_concept |
223 | # error "__cpp_lib_move_iterator_concept should be defined in c++23" |
224 | # endif |
225 | # if __cpp_lib_move_iterator_concept != 202207L |
226 | # error "__cpp_lib_move_iterator_concept should have the value 202207L in c++23" |
227 | # endif |
228 | |
229 | # ifndef __cpp_lib_nonmember_container_access |
230 | # error "__cpp_lib_nonmember_container_access should be defined in c++23" |
231 | # endif |
232 | # if __cpp_lib_nonmember_container_access != 201411L |
233 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23" |
234 | # endif |
235 | |
236 | # ifndef __cpp_lib_null_iterators |
237 | # error "__cpp_lib_null_iterators should be defined in c++23" |
238 | # endif |
239 | # if __cpp_lib_null_iterators != 201304L |
240 | # error "__cpp_lib_null_iterators should have the value 201304L in c++23" |
241 | # endif |
242 | |
243 | # ifndef __cpp_lib_ranges |
244 | # error "__cpp_lib_ranges should be defined in c++23" |
245 | # endif |
246 | # if __cpp_lib_ranges != 202406L |
247 | # error "__cpp_lib_ranges should have the value 202406L in c++23" |
248 | # endif |
249 | |
250 | # ifndef __cpp_lib_ssize |
251 | # error "__cpp_lib_ssize should be defined in c++23" |
252 | # endif |
253 | # if __cpp_lib_ssize != 201902L |
254 | # error "__cpp_lib_ssize should have the value 201902L in c++23" |
255 | # endif |
256 | |
257 | #elif TEST_STD_VER > 23 |
258 | |
259 | # ifndef __cpp_lib_array_constexpr |
260 | # error "__cpp_lib_array_constexpr should be defined in c++26" |
261 | # endif |
262 | # if __cpp_lib_array_constexpr != 201811L |
263 | # error "__cpp_lib_array_constexpr should have the value 201811L in c++26" |
264 | # endif |
265 | |
266 | # ifndef __cpp_lib_constexpr_iterator |
267 | # error "__cpp_lib_constexpr_iterator should be defined in c++26" |
268 | # endif |
269 | # if __cpp_lib_constexpr_iterator != 201811L |
270 | # error "__cpp_lib_constexpr_iterator should have the value 201811L in c++26" |
271 | # endif |
272 | |
273 | # ifndef __cpp_lib_make_reverse_iterator |
274 | # error "__cpp_lib_make_reverse_iterator should be defined in c++26" |
275 | # endif |
276 | # if __cpp_lib_make_reverse_iterator != 201402L |
277 | # error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++26" |
278 | # endif |
279 | |
280 | # ifndef __cpp_lib_move_iterator_concept |
281 | # error "__cpp_lib_move_iterator_concept should be defined in c++26" |
282 | # endif |
283 | # if __cpp_lib_move_iterator_concept != 202207L |
284 | # error "__cpp_lib_move_iterator_concept should have the value 202207L in c++26" |
285 | # endif |
286 | |
287 | # ifndef __cpp_lib_nonmember_container_access |
288 | # error "__cpp_lib_nonmember_container_access should be defined in c++26" |
289 | # endif |
290 | # if __cpp_lib_nonmember_container_access != 201411L |
291 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26" |
292 | # endif |
293 | |
294 | # ifndef __cpp_lib_null_iterators |
295 | # error "__cpp_lib_null_iterators should be defined in c++26" |
296 | # endif |
297 | # if __cpp_lib_null_iterators != 201304L |
298 | # error "__cpp_lib_null_iterators should have the value 201304L in c++26" |
299 | # endif |
300 | |
301 | # ifndef __cpp_lib_ranges |
302 | # error "__cpp_lib_ranges should be defined in c++26" |
303 | # endif |
304 | # if __cpp_lib_ranges != 202406L |
305 | # error "__cpp_lib_ranges should have the value 202406L in c++26" |
306 | # endif |
307 | |
308 | # ifndef __cpp_lib_ssize |
309 | # error "__cpp_lib_ssize should be defined in c++26" |
310 | # endif |
311 | # if __cpp_lib_ssize != 201902L |
312 | # error "__cpp_lib_ssize should have the value 201902L in c++26" |
313 | # endif |
314 | |
315 | #endif // TEST_STD_VER > 23 |
316 | |
317 | // clang-format on |
318 | |
319 | |