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 | // <functional> |
13 | |
14 | // Test the feature test macros defined by <functional> |
15 | |
16 | // clang-format off |
17 | |
18 | #include <functional> |
19 | #include "test_macros.h" |
20 | |
21 | #if TEST_STD_VER < 14 |
22 | |
23 | # ifdef __cpp_lib_bind_back |
24 | # error "__cpp_lib_bind_back should not be defined before c++23" |
25 | # endif |
26 | |
27 | # ifdef __cpp_lib_bind_front |
28 | # error "__cpp_lib_bind_front should not be defined before c++20" |
29 | # endif |
30 | |
31 | # ifdef __cpp_lib_boyer_moore_searcher |
32 | # error "__cpp_lib_boyer_moore_searcher should not be defined before c++17" |
33 | # endif |
34 | |
35 | # ifdef __cpp_lib_constexpr_functional |
36 | # error "__cpp_lib_constexpr_functional should not be defined before c++20" |
37 | # endif |
38 | |
39 | # ifdef __cpp_lib_copyable_function |
40 | # error "__cpp_lib_copyable_function should not be defined before c++26" |
41 | # endif |
42 | |
43 | # ifdef __cpp_lib_function_ref |
44 | # error "__cpp_lib_function_ref should not be defined before c++26" |
45 | # endif |
46 | |
47 | # ifdef __cpp_lib_invoke |
48 | # error "__cpp_lib_invoke should not be defined before c++17" |
49 | # endif |
50 | |
51 | # ifdef __cpp_lib_invoke_r |
52 | # error "__cpp_lib_invoke_r should not be defined before c++23" |
53 | # endif |
54 | |
55 | # ifdef __cpp_lib_move_only_function |
56 | # error "__cpp_lib_move_only_function should not be defined before c++23" |
57 | # endif |
58 | |
59 | # ifdef __cpp_lib_not_fn |
60 | # error "__cpp_lib_not_fn should not be defined before c++17" |
61 | # endif |
62 | |
63 | # ifdef __cpp_lib_ranges |
64 | # error "__cpp_lib_ranges should not be defined before c++20" |
65 | # endif |
66 | |
67 | # ifdef __cpp_lib_reference_wrapper |
68 | # error "__cpp_lib_reference_wrapper should not be defined before c++26" |
69 | # endif |
70 | |
71 | # ifdef __cpp_lib_result_of_sfinae |
72 | # error "__cpp_lib_result_of_sfinae should not be defined before c++14" |
73 | # endif |
74 | |
75 | # ifdef __cpp_lib_transparent_operators |
76 | # error "__cpp_lib_transparent_operators should not be defined before c++14" |
77 | # endif |
78 | |
79 | # ifdef __cpp_lib_unwrap_ref |
80 | # error "__cpp_lib_unwrap_ref should not be defined before c++20" |
81 | # endif |
82 | |
83 | #elif TEST_STD_VER == 14 |
84 | |
85 | # ifdef __cpp_lib_bind_back |
86 | # error "__cpp_lib_bind_back should not be defined before c++23" |
87 | # endif |
88 | |
89 | # ifdef __cpp_lib_bind_front |
90 | # error "__cpp_lib_bind_front should not be defined before c++20" |
91 | # endif |
92 | |
93 | # ifdef __cpp_lib_boyer_moore_searcher |
94 | # error "__cpp_lib_boyer_moore_searcher should not be defined before c++17" |
95 | # endif |
96 | |
97 | # ifdef __cpp_lib_constexpr_functional |
98 | # error "__cpp_lib_constexpr_functional should not be defined before c++20" |
99 | # endif |
100 | |
101 | # ifdef __cpp_lib_copyable_function |
102 | # error "__cpp_lib_copyable_function should not be defined before c++26" |
103 | # endif |
104 | |
105 | # ifdef __cpp_lib_function_ref |
106 | # error "__cpp_lib_function_ref should not be defined before c++26" |
107 | # endif |
108 | |
109 | # ifdef __cpp_lib_invoke |
110 | # error "__cpp_lib_invoke should not be defined before c++17" |
111 | # endif |
112 | |
113 | # ifdef __cpp_lib_invoke_r |
114 | # error "__cpp_lib_invoke_r should not be defined before c++23" |
115 | # endif |
116 | |
117 | # ifdef __cpp_lib_move_only_function |
118 | # error "__cpp_lib_move_only_function should not be defined before c++23" |
119 | # endif |
120 | |
121 | # ifdef __cpp_lib_not_fn |
122 | # error "__cpp_lib_not_fn should not be defined before c++17" |
123 | # endif |
124 | |
125 | # ifdef __cpp_lib_ranges |
126 | # error "__cpp_lib_ranges should not be defined before c++20" |
127 | # endif |
128 | |
129 | # ifdef __cpp_lib_reference_wrapper |
130 | # error "__cpp_lib_reference_wrapper should not be defined before c++26" |
131 | # endif |
132 | |
133 | # ifndef __cpp_lib_result_of_sfinae |
134 | # error "__cpp_lib_result_of_sfinae should be defined in c++14" |
135 | # endif |
136 | # if __cpp_lib_result_of_sfinae != 201210L |
137 | # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++14" |
138 | # endif |
139 | |
140 | # ifndef __cpp_lib_transparent_operators |
141 | # error "__cpp_lib_transparent_operators should be defined in c++14" |
142 | # endif |
143 | # if __cpp_lib_transparent_operators != 201210L |
144 | # error "__cpp_lib_transparent_operators should have the value 201210L in c++14" |
145 | # endif |
146 | |
147 | # ifdef __cpp_lib_unwrap_ref |
148 | # error "__cpp_lib_unwrap_ref should not be defined before c++20" |
149 | # endif |
150 | |
151 | #elif TEST_STD_VER == 17 |
152 | |
153 | # ifdef __cpp_lib_bind_back |
154 | # error "__cpp_lib_bind_back should not be defined before c++23" |
155 | # endif |
156 | |
157 | # ifdef __cpp_lib_bind_front |
158 | # error "__cpp_lib_bind_front should not be defined before c++20" |
159 | # endif |
160 | |
161 | # ifndef __cpp_lib_boyer_moore_searcher |
162 | # error "__cpp_lib_boyer_moore_searcher should be defined in c++17" |
163 | # endif |
164 | # if __cpp_lib_boyer_moore_searcher != 201603L |
165 | # error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++17" |
166 | # endif |
167 | |
168 | # ifdef __cpp_lib_constexpr_functional |
169 | # error "__cpp_lib_constexpr_functional should not be defined before c++20" |
170 | # endif |
171 | |
172 | # ifdef __cpp_lib_copyable_function |
173 | # error "__cpp_lib_copyable_function should not be defined before c++26" |
174 | # endif |
175 | |
176 | # ifdef __cpp_lib_function_ref |
177 | # error "__cpp_lib_function_ref should not be defined before c++26" |
178 | # endif |
179 | |
180 | # ifndef __cpp_lib_invoke |
181 | # error "__cpp_lib_invoke should be defined in c++17" |
182 | # endif |
183 | # if __cpp_lib_invoke != 201411L |
184 | # error "__cpp_lib_invoke should have the value 201411L in c++17" |
185 | # endif |
186 | |
187 | # ifdef __cpp_lib_invoke_r |
188 | # error "__cpp_lib_invoke_r should not be defined before c++23" |
189 | # endif |
190 | |
191 | # ifdef __cpp_lib_move_only_function |
192 | # error "__cpp_lib_move_only_function should not be defined before c++23" |
193 | # endif |
194 | |
195 | # ifndef __cpp_lib_not_fn |
196 | # error "__cpp_lib_not_fn should be defined in c++17" |
197 | # endif |
198 | # if __cpp_lib_not_fn != 201603L |
199 | # error "__cpp_lib_not_fn should have the value 201603L in c++17" |
200 | # endif |
201 | |
202 | # ifdef __cpp_lib_ranges |
203 | # error "__cpp_lib_ranges should not be defined before c++20" |
204 | # endif |
205 | |
206 | # ifdef __cpp_lib_reference_wrapper |
207 | # error "__cpp_lib_reference_wrapper should not be defined before c++26" |
208 | # endif |
209 | |
210 | # ifndef __cpp_lib_result_of_sfinae |
211 | # error "__cpp_lib_result_of_sfinae should be defined in c++17" |
212 | # endif |
213 | # if __cpp_lib_result_of_sfinae != 201210L |
214 | # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++17" |
215 | # endif |
216 | |
217 | # ifndef __cpp_lib_transparent_operators |
218 | # error "__cpp_lib_transparent_operators should be defined in c++17" |
219 | # endif |
220 | # if __cpp_lib_transparent_operators != 201510L |
221 | # error "__cpp_lib_transparent_operators should have the value 201510L in c++17" |
222 | # endif |
223 | |
224 | # ifdef __cpp_lib_unwrap_ref |
225 | # error "__cpp_lib_unwrap_ref should not be defined before c++20" |
226 | # endif |
227 | |
228 | #elif TEST_STD_VER == 20 |
229 | |
230 | # ifdef __cpp_lib_bind_back |
231 | # error "__cpp_lib_bind_back should not be defined before c++23" |
232 | # endif |
233 | |
234 | # ifndef __cpp_lib_bind_front |
235 | # error "__cpp_lib_bind_front should be defined in c++20" |
236 | # endif |
237 | # if __cpp_lib_bind_front != 201907L |
238 | # error "__cpp_lib_bind_front should have the value 201907L in c++20" |
239 | # endif |
240 | |
241 | # ifndef __cpp_lib_boyer_moore_searcher |
242 | # error "__cpp_lib_boyer_moore_searcher should be defined in c++20" |
243 | # endif |
244 | # if __cpp_lib_boyer_moore_searcher != 201603L |
245 | # error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++20" |
246 | # endif |
247 | |
248 | # ifndef __cpp_lib_constexpr_functional |
249 | # error "__cpp_lib_constexpr_functional should be defined in c++20" |
250 | # endif |
251 | # if __cpp_lib_constexpr_functional != 201907L |
252 | # error "__cpp_lib_constexpr_functional should have the value 201907L in c++20" |
253 | # endif |
254 | |
255 | # ifdef __cpp_lib_copyable_function |
256 | # error "__cpp_lib_copyable_function should not be defined before c++26" |
257 | # endif |
258 | |
259 | # ifdef __cpp_lib_function_ref |
260 | # error "__cpp_lib_function_ref should not be defined before c++26" |
261 | # endif |
262 | |
263 | # ifndef __cpp_lib_invoke |
264 | # error "__cpp_lib_invoke should be defined in c++20" |
265 | # endif |
266 | # if __cpp_lib_invoke != 201411L |
267 | # error "__cpp_lib_invoke should have the value 201411L in c++20" |
268 | # endif |
269 | |
270 | # ifdef __cpp_lib_invoke_r |
271 | # error "__cpp_lib_invoke_r should not be defined before c++23" |
272 | # endif |
273 | |
274 | # ifdef __cpp_lib_move_only_function |
275 | # error "__cpp_lib_move_only_function should not be defined before c++23" |
276 | # endif |
277 | |
278 | # ifndef __cpp_lib_not_fn |
279 | # error "__cpp_lib_not_fn should be defined in c++20" |
280 | # endif |
281 | # if __cpp_lib_not_fn != 201603L |
282 | # error "__cpp_lib_not_fn should have the value 201603L in c++20" |
283 | # endif |
284 | |
285 | # ifndef __cpp_lib_ranges |
286 | # error "__cpp_lib_ranges should be defined in c++20" |
287 | # endif |
288 | # if __cpp_lib_ranges != 202110L |
289 | # error "__cpp_lib_ranges should have the value 202110L in c++20" |
290 | # endif |
291 | |
292 | # ifdef __cpp_lib_reference_wrapper |
293 | # error "__cpp_lib_reference_wrapper should not be defined before c++26" |
294 | # endif |
295 | |
296 | # ifndef __cpp_lib_result_of_sfinae |
297 | # error "__cpp_lib_result_of_sfinae should be defined in c++20" |
298 | # endif |
299 | # if __cpp_lib_result_of_sfinae != 201210L |
300 | # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++20" |
301 | # endif |
302 | |
303 | # ifndef __cpp_lib_transparent_operators |
304 | # error "__cpp_lib_transparent_operators should be defined in c++20" |
305 | # endif |
306 | # if __cpp_lib_transparent_operators != 201510L |
307 | # error "__cpp_lib_transparent_operators should have the value 201510L in c++20" |
308 | # endif |
309 | |
310 | # ifndef __cpp_lib_unwrap_ref |
311 | # error "__cpp_lib_unwrap_ref should be defined in c++20" |
312 | # endif |
313 | # if __cpp_lib_unwrap_ref != 201811L |
314 | # error "__cpp_lib_unwrap_ref should have the value 201811L in c++20" |
315 | # endif |
316 | |
317 | #elif TEST_STD_VER == 23 |
318 | |
319 | # ifndef __cpp_lib_bind_back |
320 | # error "__cpp_lib_bind_back should be defined in c++23" |
321 | # endif |
322 | # if __cpp_lib_bind_back != 202202L |
323 | # error "__cpp_lib_bind_back should have the value 202202L in c++23" |
324 | # endif |
325 | |
326 | # ifndef __cpp_lib_bind_front |
327 | # error "__cpp_lib_bind_front should be defined in c++23" |
328 | # endif |
329 | # if __cpp_lib_bind_front != 201907L |
330 | # error "__cpp_lib_bind_front should have the value 201907L in c++23" |
331 | # endif |
332 | |
333 | # ifndef __cpp_lib_boyer_moore_searcher |
334 | # error "__cpp_lib_boyer_moore_searcher should be defined in c++23" |
335 | # endif |
336 | # if __cpp_lib_boyer_moore_searcher != 201603L |
337 | # error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++23" |
338 | # endif |
339 | |
340 | # ifndef __cpp_lib_constexpr_functional |
341 | # error "__cpp_lib_constexpr_functional should be defined in c++23" |
342 | # endif |
343 | # if __cpp_lib_constexpr_functional != 201907L |
344 | # error "__cpp_lib_constexpr_functional should have the value 201907L in c++23" |
345 | # endif |
346 | |
347 | # ifdef __cpp_lib_copyable_function |
348 | # error "__cpp_lib_copyable_function should not be defined before c++26" |
349 | # endif |
350 | |
351 | # ifdef __cpp_lib_function_ref |
352 | # error "__cpp_lib_function_ref should not be defined before c++26" |
353 | # endif |
354 | |
355 | # ifndef __cpp_lib_invoke |
356 | # error "__cpp_lib_invoke should be defined in c++23" |
357 | # endif |
358 | # if __cpp_lib_invoke != 201411L |
359 | # error "__cpp_lib_invoke should have the value 201411L in c++23" |
360 | # endif |
361 | |
362 | # ifndef __cpp_lib_invoke_r |
363 | # error "__cpp_lib_invoke_r should be defined in c++23" |
364 | # endif |
365 | # if __cpp_lib_invoke_r != 202106L |
366 | # error "__cpp_lib_invoke_r should have the value 202106L in c++23" |
367 | # endif |
368 | |
369 | # if !defined(_LIBCPP_VERSION) |
370 | # ifndef __cpp_lib_move_only_function |
371 | # error "__cpp_lib_move_only_function should be defined in c++23" |
372 | # endif |
373 | # if __cpp_lib_move_only_function != 202110L |
374 | # error "__cpp_lib_move_only_function should have the value 202110L in c++23" |
375 | # endif |
376 | # else |
377 | # ifdef __cpp_lib_move_only_function |
378 | # error "__cpp_lib_move_only_function should not be defined because it is unimplemented in libc++!" |
379 | # endif |
380 | # endif |
381 | |
382 | # ifndef __cpp_lib_not_fn |
383 | # error "__cpp_lib_not_fn should be defined in c++23" |
384 | # endif |
385 | # if __cpp_lib_not_fn != 201603L |
386 | # error "__cpp_lib_not_fn should have the value 201603L in c++23" |
387 | # endif |
388 | |
389 | # ifndef __cpp_lib_ranges |
390 | # error "__cpp_lib_ranges should be defined in c++23" |
391 | # endif |
392 | # if __cpp_lib_ranges != 202406L |
393 | # error "__cpp_lib_ranges should have the value 202406L in c++23" |
394 | # endif |
395 | |
396 | # ifdef __cpp_lib_reference_wrapper |
397 | # error "__cpp_lib_reference_wrapper should not be defined before c++26" |
398 | # endif |
399 | |
400 | # ifndef __cpp_lib_result_of_sfinae |
401 | # error "__cpp_lib_result_of_sfinae should be defined in c++23" |
402 | # endif |
403 | # if __cpp_lib_result_of_sfinae != 201210L |
404 | # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++23" |
405 | # endif |
406 | |
407 | # ifndef __cpp_lib_transparent_operators |
408 | # error "__cpp_lib_transparent_operators should be defined in c++23" |
409 | # endif |
410 | # if __cpp_lib_transparent_operators != 201510L |
411 | # error "__cpp_lib_transparent_operators should have the value 201510L in c++23" |
412 | # endif |
413 | |
414 | # ifndef __cpp_lib_unwrap_ref |
415 | # error "__cpp_lib_unwrap_ref should be defined in c++23" |
416 | # endif |
417 | # if __cpp_lib_unwrap_ref != 201811L |
418 | # error "__cpp_lib_unwrap_ref should have the value 201811L in c++23" |
419 | # endif |
420 | |
421 | #elif TEST_STD_VER > 23 |
422 | |
423 | # ifndef __cpp_lib_bind_back |
424 | # error "__cpp_lib_bind_back should be defined in c++26" |
425 | # endif |
426 | # if __cpp_lib_bind_back != 202202L |
427 | # error "__cpp_lib_bind_back should have the value 202202L in c++26" |
428 | # endif |
429 | |
430 | # ifndef __cpp_lib_bind_front |
431 | # error "__cpp_lib_bind_front should be defined in c++26" |
432 | # endif |
433 | # if __cpp_lib_bind_front != 202306L |
434 | # error "__cpp_lib_bind_front should have the value 202306L in c++26" |
435 | # endif |
436 | |
437 | # ifndef __cpp_lib_boyer_moore_searcher |
438 | # error "__cpp_lib_boyer_moore_searcher should be defined in c++26" |
439 | # endif |
440 | # if __cpp_lib_boyer_moore_searcher != 201603L |
441 | # error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++26" |
442 | # endif |
443 | |
444 | # ifndef __cpp_lib_constexpr_functional |
445 | # error "__cpp_lib_constexpr_functional should be defined in c++26" |
446 | # endif |
447 | # if __cpp_lib_constexpr_functional != 201907L |
448 | # error "__cpp_lib_constexpr_functional should have the value 201907L in c++26" |
449 | # endif |
450 | |
451 | # if !defined(_LIBCPP_VERSION) |
452 | # ifndef __cpp_lib_copyable_function |
453 | # error "__cpp_lib_copyable_function should be defined in c++26" |
454 | # endif |
455 | # if __cpp_lib_copyable_function != 202306L |
456 | # error "__cpp_lib_copyable_function should have the value 202306L in c++26" |
457 | # endif |
458 | # else |
459 | # ifdef __cpp_lib_copyable_function |
460 | # error "__cpp_lib_copyable_function should not be defined because it is unimplemented in libc++!" |
461 | # endif |
462 | # endif |
463 | |
464 | # if !defined(_LIBCPP_VERSION) |
465 | # ifndef __cpp_lib_function_ref |
466 | # error "__cpp_lib_function_ref should be defined in c++26" |
467 | # endif |
468 | # if __cpp_lib_function_ref != 202306L |
469 | # error "__cpp_lib_function_ref should have the value 202306L in c++26" |
470 | # endif |
471 | # else |
472 | # ifdef __cpp_lib_function_ref |
473 | # error "__cpp_lib_function_ref should not be defined because it is unimplemented in libc++!" |
474 | # endif |
475 | # endif |
476 | |
477 | # ifndef __cpp_lib_invoke |
478 | # error "__cpp_lib_invoke should be defined in c++26" |
479 | # endif |
480 | # if __cpp_lib_invoke != 201411L |
481 | # error "__cpp_lib_invoke should have the value 201411L in c++26" |
482 | # endif |
483 | |
484 | # ifndef __cpp_lib_invoke_r |
485 | # error "__cpp_lib_invoke_r should be defined in c++26" |
486 | # endif |
487 | # if __cpp_lib_invoke_r != 202106L |
488 | # error "__cpp_lib_invoke_r should have the value 202106L in c++26" |
489 | # endif |
490 | |
491 | # if !defined(_LIBCPP_VERSION) |
492 | # ifndef __cpp_lib_move_only_function |
493 | # error "__cpp_lib_move_only_function should be defined in c++26" |
494 | # endif |
495 | # if __cpp_lib_move_only_function != 202110L |
496 | # error "__cpp_lib_move_only_function should have the value 202110L in c++26" |
497 | # endif |
498 | # else |
499 | # ifdef __cpp_lib_move_only_function |
500 | # error "__cpp_lib_move_only_function should not be defined because it is unimplemented in libc++!" |
501 | # endif |
502 | # endif |
503 | |
504 | # ifndef __cpp_lib_not_fn |
505 | # error "__cpp_lib_not_fn should be defined in c++26" |
506 | # endif |
507 | # if __cpp_lib_not_fn != 202306L |
508 | # error "__cpp_lib_not_fn should have the value 202306L in c++26" |
509 | # endif |
510 | |
511 | # ifndef __cpp_lib_ranges |
512 | # error "__cpp_lib_ranges should be defined in c++26" |
513 | # endif |
514 | # if __cpp_lib_ranges != 202406L |
515 | # error "__cpp_lib_ranges should have the value 202406L in c++26" |
516 | # endif |
517 | |
518 | # ifndef __cpp_lib_reference_wrapper |
519 | # error "__cpp_lib_reference_wrapper should be defined in c++26" |
520 | # endif |
521 | # if __cpp_lib_reference_wrapper != 202403L |
522 | # error "__cpp_lib_reference_wrapper should have the value 202403L in c++26" |
523 | # endif |
524 | |
525 | # ifndef __cpp_lib_result_of_sfinae |
526 | # error "__cpp_lib_result_of_sfinae should be defined in c++26" |
527 | # endif |
528 | # if __cpp_lib_result_of_sfinae != 201210L |
529 | # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++26" |
530 | # endif |
531 | |
532 | # ifndef __cpp_lib_transparent_operators |
533 | # error "__cpp_lib_transparent_operators should be defined in c++26" |
534 | # endif |
535 | # if __cpp_lib_transparent_operators != 201510L |
536 | # error "__cpp_lib_transparent_operators should have the value 201510L in c++26" |
537 | # endif |
538 | |
539 | # ifndef __cpp_lib_unwrap_ref |
540 | # error "__cpp_lib_unwrap_ref should be defined in c++26" |
541 | # endif |
542 | # if __cpp_lib_unwrap_ref != 201811L |
543 | # error "__cpp_lib_unwrap_ref should have the value 201811L in c++26" |
544 | # endif |
545 | |
546 | #endif // TEST_STD_VER > 23 |
547 | |
548 | // clang-format on |
549 | |
550 | |