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 | // <map> |
13 | |
14 | // Test the feature test macros defined by <map> |
15 | |
16 | // clang-format off |
17 | |
18 | #include <map> |
19 | #include "test_macros.h" |
20 | |
21 | #if TEST_STD_VER < 14 |
22 | |
23 | # ifdef __cpp_lib_allocator_traits_is_always_equal |
24 | # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" |
25 | # endif |
26 | |
27 | # ifdef __cpp_lib_associative_heterogeneous_erasure |
28 | # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23" |
29 | # endif |
30 | |
31 | # ifdef __cpp_lib_associative_heterogeneous_insertion |
32 | # error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26" |
33 | # endif |
34 | |
35 | # ifdef __cpp_lib_containers_ranges |
36 | # error "__cpp_lib_containers_ranges should not be defined before c++23" |
37 | # endif |
38 | |
39 | # ifdef __cpp_lib_erase_if |
40 | # error "__cpp_lib_erase_if should not be defined before c++20" |
41 | # endif |
42 | |
43 | # ifdef __cpp_lib_generic_associative_lookup |
44 | # error "__cpp_lib_generic_associative_lookup should not be defined before c++14" |
45 | # endif |
46 | |
47 | # ifdef __cpp_lib_map_try_emplace |
48 | # error "__cpp_lib_map_try_emplace should not be defined before c++17" |
49 | # endif |
50 | |
51 | # ifdef __cpp_lib_node_extract |
52 | # error "__cpp_lib_node_extract should not be defined before c++17" |
53 | # endif |
54 | |
55 | # ifdef __cpp_lib_nonmember_container_access |
56 | # error "__cpp_lib_nonmember_container_access should not be defined before c++17" |
57 | # endif |
58 | |
59 | # ifdef __cpp_lib_tuple_like |
60 | # error "__cpp_lib_tuple_like should not be defined before c++23" |
61 | # endif |
62 | |
63 | #elif TEST_STD_VER == 14 |
64 | |
65 | # ifdef __cpp_lib_allocator_traits_is_always_equal |
66 | # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" |
67 | # endif |
68 | |
69 | # ifdef __cpp_lib_associative_heterogeneous_erasure |
70 | # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23" |
71 | # endif |
72 | |
73 | # ifdef __cpp_lib_associative_heterogeneous_insertion |
74 | # error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26" |
75 | # endif |
76 | |
77 | # ifdef __cpp_lib_containers_ranges |
78 | # error "__cpp_lib_containers_ranges should not be defined before c++23" |
79 | # endif |
80 | |
81 | # ifdef __cpp_lib_erase_if |
82 | # error "__cpp_lib_erase_if should not be defined before c++20" |
83 | # endif |
84 | |
85 | # ifndef __cpp_lib_generic_associative_lookup |
86 | # error "__cpp_lib_generic_associative_lookup should be defined in c++14" |
87 | # endif |
88 | # if __cpp_lib_generic_associative_lookup != 201304L |
89 | # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++14" |
90 | # endif |
91 | |
92 | # ifdef __cpp_lib_map_try_emplace |
93 | # error "__cpp_lib_map_try_emplace should not be defined before c++17" |
94 | # endif |
95 | |
96 | # ifdef __cpp_lib_node_extract |
97 | # error "__cpp_lib_node_extract should not be defined before c++17" |
98 | # endif |
99 | |
100 | # ifdef __cpp_lib_nonmember_container_access |
101 | # error "__cpp_lib_nonmember_container_access should not be defined before c++17" |
102 | # endif |
103 | |
104 | # ifdef __cpp_lib_tuple_like |
105 | # error "__cpp_lib_tuple_like should not be defined before c++23" |
106 | # endif |
107 | |
108 | #elif TEST_STD_VER == 17 |
109 | |
110 | # ifndef __cpp_lib_allocator_traits_is_always_equal |
111 | # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" |
112 | # endif |
113 | # if __cpp_lib_allocator_traits_is_always_equal != 201411L |
114 | # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" |
115 | # endif |
116 | |
117 | # ifdef __cpp_lib_associative_heterogeneous_erasure |
118 | # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23" |
119 | # endif |
120 | |
121 | # ifdef __cpp_lib_associative_heterogeneous_insertion |
122 | # error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26" |
123 | # endif |
124 | |
125 | # ifdef __cpp_lib_containers_ranges |
126 | # error "__cpp_lib_containers_ranges should not be defined before c++23" |
127 | # endif |
128 | |
129 | # ifdef __cpp_lib_erase_if |
130 | # error "__cpp_lib_erase_if should not be defined before c++20" |
131 | # endif |
132 | |
133 | # ifndef __cpp_lib_generic_associative_lookup |
134 | # error "__cpp_lib_generic_associative_lookup should be defined in c++17" |
135 | # endif |
136 | # if __cpp_lib_generic_associative_lookup != 201304L |
137 | # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++17" |
138 | # endif |
139 | |
140 | # ifndef __cpp_lib_map_try_emplace |
141 | # error "__cpp_lib_map_try_emplace should be defined in c++17" |
142 | # endif |
143 | # if __cpp_lib_map_try_emplace != 201411L |
144 | # error "__cpp_lib_map_try_emplace should have the value 201411L in c++17" |
145 | # endif |
146 | |
147 | # ifndef __cpp_lib_node_extract |
148 | # error "__cpp_lib_node_extract should be defined in c++17" |
149 | # endif |
150 | # if __cpp_lib_node_extract != 201606L |
151 | # error "__cpp_lib_node_extract should have the value 201606L in c++17" |
152 | # endif |
153 | |
154 | # ifndef __cpp_lib_nonmember_container_access |
155 | # error "__cpp_lib_nonmember_container_access should be defined in c++17" |
156 | # endif |
157 | # if __cpp_lib_nonmember_container_access != 201411L |
158 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" |
159 | # endif |
160 | |
161 | # ifdef __cpp_lib_tuple_like |
162 | # error "__cpp_lib_tuple_like should not be defined before c++23" |
163 | # endif |
164 | |
165 | #elif TEST_STD_VER == 20 |
166 | |
167 | # ifndef __cpp_lib_allocator_traits_is_always_equal |
168 | # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20" |
169 | # endif |
170 | # if __cpp_lib_allocator_traits_is_always_equal != 201411L |
171 | # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20" |
172 | # endif |
173 | |
174 | # ifdef __cpp_lib_associative_heterogeneous_erasure |
175 | # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23" |
176 | # endif |
177 | |
178 | # ifdef __cpp_lib_associative_heterogeneous_insertion |
179 | # error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26" |
180 | # endif |
181 | |
182 | # ifdef __cpp_lib_containers_ranges |
183 | # error "__cpp_lib_containers_ranges should not be defined before c++23" |
184 | # endif |
185 | |
186 | # ifndef __cpp_lib_erase_if |
187 | # error "__cpp_lib_erase_if should be defined in c++20" |
188 | # endif |
189 | # if __cpp_lib_erase_if != 202002L |
190 | # error "__cpp_lib_erase_if should have the value 202002L in c++20" |
191 | # endif |
192 | |
193 | # ifndef __cpp_lib_generic_associative_lookup |
194 | # error "__cpp_lib_generic_associative_lookup should be defined in c++20" |
195 | # endif |
196 | # if __cpp_lib_generic_associative_lookup != 201304L |
197 | # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++20" |
198 | # endif |
199 | |
200 | # ifndef __cpp_lib_map_try_emplace |
201 | # error "__cpp_lib_map_try_emplace should be defined in c++20" |
202 | # endif |
203 | # if __cpp_lib_map_try_emplace != 201411L |
204 | # error "__cpp_lib_map_try_emplace should have the value 201411L in c++20" |
205 | # endif |
206 | |
207 | # ifndef __cpp_lib_node_extract |
208 | # error "__cpp_lib_node_extract should be defined in c++20" |
209 | # endif |
210 | # if __cpp_lib_node_extract != 201606L |
211 | # error "__cpp_lib_node_extract should have the value 201606L in c++20" |
212 | # endif |
213 | |
214 | # ifndef __cpp_lib_nonmember_container_access |
215 | # error "__cpp_lib_nonmember_container_access should be defined in c++20" |
216 | # endif |
217 | # if __cpp_lib_nonmember_container_access != 201411L |
218 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" |
219 | # endif |
220 | |
221 | # ifdef __cpp_lib_tuple_like |
222 | # error "__cpp_lib_tuple_like should not be defined before c++23" |
223 | # endif |
224 | |
225 | #elif TEST_STD_VER == 23 |
226 | |
227 | # ifndef __cpp_lib_allocator_traits_is_always_equal |
228 | # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23" |
229 | # endif |
230 | # if __cpp_lib_allocator_traits_is_always_equal != 201411L |
231 | # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++23" |
232 | # endif |
233 | |
234 | # if !defined(_LIBCPP_VERSION) |
235 | # ifndef __cpp_lib_associative_heterogeneous_erasure |
236 | # error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++23" |
237 | # endif |
238 | # if __cpp_lib_associative_heterogeneous_erasure != 202110L |
239 | # error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++23" |
240 | # endif |
241 | # else |
242 | # ifdef __cpp_lib_associative_heterogeneous_erasure |
243 | # error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!" |
244 | # endif |
245 | # endif |
246 | |
247 | # ifdef __cpp_lib_associative_heterogeneous_insertion |
248 | # error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26" |
249 | # endif |
250 | |
251 | # ifndef __cpp_lib_containers_ranges |
252 | # error "__cpp_lib_containers_ranges should be defined in c++23" |
253 | # endif |
254 | # if __cpp_lib_containers_ranges != 202202L |
255 | # error "__cpp_lib_containers_ranges should have the value 202202L in c++23" |
256 | # endif |
257 | |
258 | # ifndef __cpp_lib_erase_if |
259 | # error "__cpp_lib_erase_if should be defined in c++23" |
260 | # endif |
261 | # if __cpp_lib_erase_if != 202002L |
262 | # error "__cpp_lib_erase_if should have the value 202002L in c++23" |
263 | # endif |
264 | |
265 | # ifndef __cpp_lib_generic_associative_lookup |
266 | # error "__cpp_lib_generic_associative_lookup should be defined in c++23" |
267 | # endif |
268 | # if __cpp_lib_generic_associative_lookup != 201304L |
269 | # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++23" |
270 | # endif |
271 | |
272 | # ifndef __cpp_lib_map_try_emplace |
273 | # error "__cpp_lib_map_try_emplace should be defined in c++23" |
274 | # endif |
275 | # if __cpp_lib_map_try_emplace != 201411L |
276 | # error "__cpp_lib_map_try_emplace should have the value 201411L in c++23" |
277 | # endif |
278 | |
279 | # ifndef __cpp_lib_node_extract |
280 | # error "__cpp_lib_node_extract should be defined in c++23" |
281 | # endif |
282 | # if __cpp_lib_node_extract != 201606L |
283 | # error "__cpp_lib_node_extract should have the value 201606L in c++23" |
284 | # endif |
285 | |
286 | # ifndef __cpp_lib_nonmember_container_access |
287 | # error "__cpp_lib_nonmember_container_access should be defined in c++23" |
288 | # endif |
289 | # if __cpp_lib_nonmember_container_access != 201411L |
290 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23" |
291 | # endif |
292 | |
293 | # if !defined(_LIBCPP_VERSION) |
294 | # ifndef __cpp_lib_tuple_like |
295 | # error "__cpp_lib_tuple_like should be defined in c++23" |
296 | # endif |
297 | # if __cpp_lib_tuple_like != 202207L |
298 | # error "__cpp_lib_tuple_like should have the value 202207L in c++23" |
299 | # endif |
300 | # else |
301 | # ifdef __cpp_lib_tuple_like |
302 | # error "__cpp_lib_tuple_like should not be defined because it is unimplemented in libc++!" |
303 | # endif |
304 | # endif |
305 | |
306 | #elif TEST_STD_VER > 23 |
307 | |
308 | # ifndef __cpp_lib_allocator_traits_is_always_equal |
309 | # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26" |
310 | # endif |
311 | # if __cpp_lib_allocator_traits_is_always_equal != 201411L |
312 | # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26" |
313 | # endif |
314 | |
315 | # if !defined(_LIBCPP_VERSION) |
316 | # ifndef __cpp_lib_associative_heterogeneous_erasure |
317 | # error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++26" |
318 | # endif |
319 | # if __cpp_lib_associative_heterogeneous_erasure != 202110L |
320 | # error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++26" |
321 | # endif |
322 | # else |
323 | # ifdef __cpp_lib_associative_heterogeneous_erasure |
324 | # error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!" |
325 | # endif |
326 | # endif |
327 | |
328 | # if !defined(_LIBCPP_VERSION) |
329 | # ifndef __cpp_lib_associative_heterogeneous_insertion |
330 | # error "__cpp_lib_associative_heterogeneous_insertion should be defined in c++26" |
331 | # endif |
332 | # if __cpp_lib_associative_heterogeneous_insertion != 202306L |
333 | # error "__cpp_lib_associative_heterogeneous_insertion should have the value 202306L in c++26" |
334 | # endif |
335 | # else |
336 | # ifdef __cpp_lib_associative_heterogeneous_insertion |
337 | # error "__cpp_lib_associative_heterogeneous_insertion should not be defined because it is unimplemented in libc++!" |
338 | # endif |
339 | # endif |
340 | |
341 | # ifndef __cpp_lib_containers_ranges |
342 | # error "__cpp_lib_containers_ranges should be defined in c++26" |
343 | # endif |
344 | # if __cpp_lib_containers_ranges != 202202L |
345 | # error "__cpp_lib_containers_ranges should have the value 202202L in c++26" |
346 | # endif |
347 | |
348 | # ifndef __cpp_lib_erase_if |
349 | # error "__cpp_lib_erase_if should be defined in c++26" |
350 | # endif |
351 | # if __cpp_lib_erase_if != 202002L |
352 | # error "__cpp_lib_erase_if should have the value 202002L in c++26" |
353 | # endif |
354 | |
355 | # ifndef __cpp_lib_generic_associative_lookup |
356 | # error "__cpp_lib_generic_associative_lookup should be defined in c++26" |
357 | # endif |
358 | # if __cpp_lib_generic_associative_lookup != 201304L |
359 | # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++26" |
360 | # endif |
361 | |
362 | # ifndef __cpp_lib_map_try_emplace |
363 | # error "__cpp_lib_map_try_emplace should be defined in c++26" |
364 | # endif |
365 | # if __cpp_lib_map_try_emplace != 201411L |
366 | # error "__cpp_lib_map_try_emplace should have the value 201411L in c++26" |
367 | # endif |
368 | |
369 | # ifndef __cpp_lib_node_extract |
370 | # error "__cpp_lib_node_extract should be defined in c++26" |
371 | # endif |
372 | # if __cpp_lib_node_extract != 201606L |
373 | # error "__cpp_lib_node_extract should have the value 201606L in c++26" |
374 | # endif |
375 | |
376 | # ifndef __cpp_lib_nonmember_container_access |
377 | # error "__cpp_lib_nonmember_container_access should be defined in c++26" |
378 | # endif |
379 | # if __cpp_lib_nonmember_container_access != 201411L |
380 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26" |
381 | # endif |
382 | |
383 | # if !defined(_LIBCPP_VERSION) |
384 | # ifndef __cpp_lib_tuple_like |
385 | # error "__cpp_lib_tuple_like should be defined in c++26" |
386 | # endif |
387 | # if __cpp_lib_tuple_like != 202311L |
388 | # error "__cpp_lib_tuple_like should have the value 202311L in c++26" |
389 | # endif |
390 | # else |
391 | # ifdef __cpp_lib_tuple_like |
392 | # error "__cpp_lib_tuple_like should not be defined because it is unimplemented in libc++!" |
393 | # endif |
394 | # endif |
395 | |
396 | #endif // TEST_STD_VER > 23 |
397 | |
398 | // clang-format on |
399 | |
400 | |