Debian Codegraph @

libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.compile.pass.cpp

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