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