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