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