12c6217f2SLouis Dionne //===----------------------------------------------------------------------===// 22c6217f2SLouis Dionne // 32c6217f2SLouis Dionne // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42c6217f2SLouis Dionne // See https://llvm.org/LICENSE.txt for license information. 52c6217f2SLouis Dionne // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 62c6217f2SLouis Dionne // 72c6217f2SLouis Dionne //===----------------------------------------------------------------------===// 82c6217f2SLouis Dionne // 92c6217f2SLouis Dionne // WARNING: This test was generated by generate_feature_test_macro_components.py 102c6217f2SLouis Dionne // and should not be edited manually. 112c6217f2SLouis Dionne // 122c6217f2SLouis Dionne // clang-format off 132c6217f2SLouis Dionne 142c6217f2SLouis Dionne // <functional> 152c6217f2SLouis Dionne 162c6217f2SLouis Dionne // Test the feature test macros defined by <functional> 172c6217f2SLouis Dionne 182c6217f2SLouis Dionne /* Constant Value 1971400505SMark de Wever __cpp_lib_bind_back 202202L [C++23] 202c6217f2SLouis Dionne __cpp_lib_bind_front 201907L [C++20] 213f05d044SMark de Wever 202306L [C++26] 222c6217f2SLouis Dionne __cpp_lib_boyer_moore_searcher 201603L [C++17] 232c6217f2SLouis Dionne __cpp_lib_constexpr_functional 201907L [C++20] 243f05d044SMark de Wever __cpp_lib_copyable_function 202306L [C++26] 253f05d044SMark de Wever __cpp_lib_function_ref 202306L [C++26] 262c6217f2SLouis Dionne __cpp_lib_invoke 201411L [C++17] 2771400505SMark de Wever __cpp_lib_invoke_r 202106L [C++23] 2871400505SMark de Wever __cpp_lib_move_only_function 202110L [C++23] 292c6217f2SLouis Dionne __cpp_lib_not_fn 201603L [C++17] 30*c91d805eSJakub Mazurkiewicz 202306L [C++26] 31026210e8SA. Jiang __cpp_lib_ranges 202110L [C++20] 32026210e8SA. Jiang 202406L [C++23] 33b699a9baSLouis Dionne __cpp_lib_reference_wrapper 202403L [C++26] 342c6217f2SLouis Dionne __cpp_lib_result_of_sfinae 201210L [C++14] 352c6217f2SLouis Dionne __cpp_lib_transparent_operators 201210L [C++14] 362c6217f2SLouis Dionne 201510L [C++17] 372c6217f2SLouis Dionne __cpp_lib_unwrap_ref 201811L [C++20] 382c6217f2SLouis Dionne */ 392c6217f2SLouis Dionne 402c6217f2SLouis Dionne #include <functional> 412c6217f2SLouis Dionne #include "test_macros.h" 422c6217f2SLouis Dionne 432c6217f2SLouis Dionne #if TEST_STD_VER < 14 442c6217f2SLouis Dionne 452c6217f2SLouis Dionne # ifdef __cpp_lib_bind_back 4671400505SMark de Wever # error "__cpp_lib_bind_back should not be defined before c++23" 472c6217f2SLouis Dionne # endif 482c6217f2SLouis Dionne 492c6217f2SLouis Dionne # ifdef __cpp_lib_bind_front 502c6217f2SLouis Dionne # error "__cpp_lib_bind_front should not be defined before c++20" 512c6217f2SLouis Dionne # endif 522c6217f2SLouis Dionne 532c6217f2SLouis Dionne # ifdef __cpp_lib_boyer_moore_searcher 542c6217f2SLouis Dionne # error "__cpp_lib_boyer_moore_searcher should not be defined before c++17" 552c6217f2SLouis Dionne # endif 562c6217f2SLouis Dionne 572c6217f2SLouis Dionne # ifdef __cpp_lib_constexpr_functional 582c6217f2SLouis Dionne # error "__cpp_lib_constexpr_functional should not be defined before c++20" 592c6217f2SLouis Dionne # endif 602c6217f2SLouis Dionne 613f05d044SMark de Wever # ifdef __cpp_lib_copyable_function 623f05d044SMark de Wever # error "__cpp_lib_copyable_function should not be defined before c++26" 633f05d044SMark de Wever # endif 643f05d044SMark de Wever 653f05d044SMark de Wever # ifdef __cpp_lib_function_ref 663f05d044SMark de Wever # error "__cpp_lib_function_ref should not be defined before c++26" 673f05d044SMark de Wever # endif 683f05d044SMark de Wever 692c6217f2SLouis Dionne # ifdef __cpp_lib_invoke 702c6217f2SLouis Dionne # error "__cpp_lib_invoke should not be defined before c++17" 712c6217f2SLouis Dionne # endif 722c6217f2SLouis Dionne 732c6217f2SLouis Dionne # ifdef __cpp_lib_invoke_r 7471400505SMark de Wever # error "__cpp_lib_invoke_r should not be defined before c++23" 752c6217f2SLouis Dionne # endif 762c6217f2SLouis Dionne 772c6217f2SLouis Dionne # ifdef __cpp_lib_move_only_function 7871400505SMark de Wever # error "__cpp_lib_move_only_function should not be defined before c++23" 792c6217f2SLouis Dionne # endif 802c6217f2SLouis Dionne 812c6217f2SLouis Dionne # ifdef __cpp_lib_not_fn 822c6217f2SLouis Dionne # error "__cpp_lib_not_fn should not be defined before c++17" 832c6217f2SLouis Dionne # endif 842c6217f2SLouis Dionne 852c6217f2SLouis Dionne # ifdef __cpp_lib_ranges 862c6217f2SLouis Dionne # error "__cpp_lib_ranges should not be defined before c++20" 872c6217f2SLouis Dionne # endif 882c6217f2SLouis Dionne 89b699a9baSLouis Dionne # ifdef __cpp_lib_reference_wrapper 90b699a9baSLouis Dionne # error "__cpp_lib_reference_wrapper should not be defined before c++26" 91b699a9baSLouis Dionne # endif 92b699a9baSLouis Dionne 932c6217f2SLouis Dionne # ifdef __cpp_lib_result_of_sfinae 942c6217f2SLouis Dionne # error "__cpp_lib_result_of_sfinae should not be defined before c++14" 952c6217f2SLouis Dionne # endif 962c6217f2SLouis Dionne 972c6217f2SLouis Dionne # ifdef __cpp_lib_transparent_operators 982c6217f2SLouis Dionne # error "__cpp_lib_transparent_operators should not be defined before c++14" 992c6217f2SLouis Dionne # endif 1002c6217f2SLouis Dionne 1012c6217f2SLouis Dionne # ifdef __cpp_lib_unwrap_ref 1022c6217f2SLouis Dionne # error "__cpp_lib_unwrap_ref should not be defined before c++20" 1032c6217f2SLouis Dionne # endif 1042c6217f2SLouis Dionne 1052c6217f2SLouis Dionne #elif TEST_STD_VER == 14 1062c6217f2SLouis Dionne 1072c6217f2SLouis Dionne # ifdef __cpp_lib_bind_back 10871400505SMark de Wever # error "__cpp_lib_bind_back should not be defined before c++23" 1092c6217f2SLouis Dionne # endif 1102c6217f2SLouis Dionne 1112c6217f2SLouis Dionne # ifdef __cpp_lib_bind_front 1122c6217f2SLouis Dionne # error "__cpp_lib_bind_front should not be defined before c++20" 1132c6217f2SLouis Dionne # endif 1142c6217f2SLouis Dionne 1152c6217f2SLouis Dionne # ifdef __cpp_lib_boyer_moore_searcher 1162c6217f2SLouis Dionne # error "__cpp_lib_boyer_moore_searcher should not be defined before c++17" 1172c6217f2SLouis Dionne # endif 1182c6217f2SLouis Dionne 1192c6217f2SLouis Dionne # ifdef __cpp_lib_constexpr_functional 1202c6217f2SLouis Dionne # error "__cpp_lib_constexpr_functional should not be defined before c++20" 1212c6217f2SLouis Dionne # endif 1222c6217f2SLouis Dionne 1233f05d044SMark de Wever # ifdef __cpp_lib_copyable_function 1243f05d044SMark de Wever # error "__cpp_lib_copyable_function should not be defined before c++26" 1253f05d044SMark de Wever # endif 1263f05d044SMark de Wever 1273f05d044SMark de Wever # ifdef __cpp_lib_function_ref 1283f05d044SMark de Wever # error "__cpp_lib_function_ref should not be defined before c++26" 1293f05d044SMark de Wever # endif 1303f05d044SMark de Wever 1312c6217f2SLouis Dionne # ifdef __cpp_lib_invoke 1322c6217f2SLouis Dionne # error "__cpp_lib_invoke should not be defined before c++17" 1332c6217f2SLouis Dionne # endif 1342c6217f2SLouis Dionne 1352c6217f2SLouis Dionne # ifdef __cpp_lib_invoke_r 13671400505SMark de Wever # error "__cpp_lib_invoke_r should not be defined before c++23" 1372c6217f2SLouis Dionne # endif 1382c6217f2SLouis Dionne 1392c6217f2SLouis Dionne # ifdef __cpp_lib_move_only_function 14071400505SMark de Wever # error "__cpp_lib_move_only_function should not be defined before c++23" 1412c6217f2SLouis Dionne # endif 1422c6217f2SLouis Dionne 1432c6217f2SLouis Dionne # ifdef __cpp_lib_not_fn 1442c6217f2SLouis Dionne # error "__cpp_lib_not_fn should not be defined before c++17" 1452c6217f2SLouis Dionne # endif 1462c6217f2SLouis Dionne 1472c6217f2SLouis Dionne # ifdef __cpp_lib_ranges 1482c6217f2SLouis Dionne # error "__cpp_lib_ranges should not be defined before c++20" 1492c6217f2SLouis Dionne # endif 1502c6217f2SLouis Dionne 151b699a9baSLouis Dionne # ifdef __cpp_lib_reference_wrapper 152b699a9baSLouis Dionne # error "__cpp_lib_reference_wrapper should not be defined before c++26" 153b699a9baSLouis Dionne # endif 154b699a9baSLouis Dionne 1552c6217f2SLouis Dionne # ifndef __cpp_lib_result_of_sfinae 1562c6217f2SLouis Dionne # error "__cpp_lib_result_of_sfinae should be defined in c++14" 1572c6217f2SLouis Dionne # endif 1582c6217f2SLouis Dionne # if __cpp_lib_result_of_sfinae != 201210L 1592c6217f2SLouis Dionne # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++14" 1602c6217f2SLouis Dionne # endif 1612c6217f2SLouis Dionne 1622c6217f2SLouis Dionne # ifndef __cpp_lib_transparent_operators 1632c6217f2SLouis Dionne # error "__cpp_lib_transparent_operators should be defined in c++14" 1642c6217f2SLouis Dionne # endif 1652c6217f2SLouis Dionne # if __cpp_lib_transparent_operators != 201210L 1662c6217f2SLouis Dionne # error "__cpp_lib_transparent_operators should have the value 201210L in c++14" 1672c6217f2SLouis Dionne # endif 1682c6217f2SLouis Dionne 1692c6217f2SLouis Dionne # ifdef __cpp_lib_unwrap_ref 1702c6217f2SLouis Dionne # error "__cpp_lib_unwrap_ref should not be defined before c++20" 1712c6217f2SLouis Dionne # endif 1722c6217f2SLouis Dionne 1732c6217f2SLouis Dionne #elif TEST_STD_VER == 17 1742c6217f2SLouis Dionne 1752c6217f2SLouis Dionne # ifdef __cpp_lib_bind_back 17671400505SMark de Wever # error "__cpp_lib_bind_back should not be defined before c++23" 1772c6217f2SLouis Dionne # endif 1782c6217f2SLouis Dionne 1792c6217f2SLouis Dionne # ifdef __cpp_lib_bind_front 1802c6217f2SLouis Dionne # error "__cpp_lib_bind_front should not be defined before c++20" 1812c6217f2SLouis Dionne # endif 1822c6217f2SLouis Dionne 1832c6217f2SLouis Dionne # ifndef __cpp_lib_boyer_moore_searcher 1842c6217f2SLouis Dionne # error "__cpp_lib_boyer_moore_searcher should be defined in c++17" 1852c6217f2SLouis Dionne # endif 1862c6217f2SLouis Dionne # if __cpp_lib_boyer_moore_searcher != 201603L 1872c6217f2SLouis Dionne # error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++17" 1882c6217f2SLouis Dionne # endif 1892c6217f2SLouis Dionne 1902c6217f2SLouis Dionne # ifdef __cpp_lib_constexpr_functional 1912c6217f2SLouis Dionne # error "__cpp_lib_constexpr_functional should not be defined before c++20" 1922c6217f2SLouis Dionne # endif 1932c6217f2SLouis Dionne 1943f05d044SMark de Wever # ifdef __cpp_lib_copyable_function 1953f05d044SMark de Wever # error "__cpp_lib_copyable_function should not be defined before c++26" 1963f05d044SMark de Wever # endif 1973f05d044SMark de Wever 1983f05d044SMark de Wever # ifdef __cpp_lib_function_ref 1993f05d044SMark de Wever # error "__cpp_lib_function_ref should not be defined before c++26" 2003f05d044SMark de Wever # endif 2013f05d044SMark de Wever 2022c6217f2SLouis Dionne # ifndef __cpp_lib_invoke 2032c6217f2SLouis Dionne # error "__cpp_lib_invoke should be defined in c++17" 2042c6217f2SLouis Dionne # endif 2052c6217f2SLouis Dionne # if __cpp_lib_invoke != 201411L 2062c6217f2SLouis Dionne # error "__cpp_lib_invoke should have the value 201411L in c++17" 2072c6217f2SLouis Dionne # endif 2082c6217f2SLouis Dionne 2092c6217f2SLouis Dionne # ifdef __cpp_lib_invoke_r 21071400505SMark de Wever # error "__cpp_lib_invoke_r should not be defined before c++23" 2112c6217f2SLouis Dionne # endif 2122c6217f2SLouis Dionne 2132c6217f2SLouis Dionne # ifdef __cpp_lib_move_only_function 21471400505SMark de Wever # error "__cpp_lib_move_only_function should not be defined before c++23" 2152c6217f2SLouis Dionne # endif 2162c6217f2SLouis Dionne 2172c6217f2SLouis Dionne # ifndef __cpp_lib_not_fn 2182c6217f2SLouis Dionne # error "__cpp_lib_not_fn should be defined in c++17" 2192c6217f2SLouis Dionne # endif 2202c6217f2SLouis Dionne # if __cpp_lib_not_fn != 201603L 2212c6217f2SLouis Dionne # error "__cpp_lib_not_fn should have the value 201603L in c++17" 2222c6217f2SLouis Dionne # endif 2232c6217f2SLouis Dionne 2242c6217f2SLouis Dionne # ifdef __cpp_lib_ranges 2252c6217f2SLouis Dionne # error "__cpp_lib_ranges should not be defined before c++20" 2262c6217f2SLouis Dionne # endif 2272c6217f2SLouis Dionne 228b699a9baSLouis Dionne # ifdef __cpp_lib_reference_wrapper 229b699a9baSLouis Dionne # error "__cpp_lib_reference_wrapper should not be defined before c++26" 230b699a9baSLouis Dionne # endif 231b699a9baSLouis Dionne 2322c6217f2SLouis Dionne # ifndef __cpp_lib_result_of_sfinae 2332c6217f2SLouis Dionne # error "__cpp_lib_result_of_sfinae should be defined in c++17" 2342c6217f2SLouis Dionne # endif 2352c6217f2SLouis Dionne # if __cpp_lib_result_of_sfinae != 201210L 2362c6217f2SLouis Dionne # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++17" 2372c6217f2SLouis Dionne # endif 2382c6217f2SLouis Dionne 2392c6217f2SLouis Dionne # ifndef __cpp_lib_transparent_operators 2402c6217f2SLouis Dionne # error "__cpp_lib_transparent_operators should be defined in c++17" 2412c6217f2SLouis Dionne # endif 2422c6217f2SLouis Dionne # if __cpp_lib_transparent_operators != 201510L 2432c6217f2SLouis Dionne # error "__cpp_lib_transparent_operators should have the value 201510L in c++17" 2442c6217f2SLouis Dionne # endif 2452c6217f2SLouis Dionne 2462c6217f2SLouis Dionne # ifdef __cpp_lib_unwrap_ref 2472c6217f2SLouis Dionne # error "__cpp_lib_unwrap_ref should not be defined before c++20" 2482c6217f2SLouis Dionne # endif 2492c6217f2SLouis Dionne 2502c6217f2SLouis Dionne #elif TEST_STD_VER == 20 2512c6217f2SLouis Dionne 2522c6217f2SLouis Dionne # ifdef __cpp_lib_bind_back 25371400505SMark de Wever # error "__cpp_lib_bind_back should not be defined before c++23" 2542c6217f2SLouis Dionne # endif 2552c6217f2SLouis Dionne 2562c6217f2SLouis Dionne # ifndef __cpp_lib_bind_front 2572c6217f2SLouis Dionne # error "__cpp_lib_bind_front should be defined in c++20" 2582c6217f2SLouis Dionne # endif 2592c6217f2SLouis Dionne # if __cpp_lib_bind_front != 201907L 2602c6217f2SLouis Dionne # error "__cpp_lib_bind_front should have the value 201907L in c++20" 2612c6217f2SLouis Dionne # endif 2622c6217f2SLouis Dionne 2632c6217f2SLouis Dionne # ifndef __cpp_lib_boyer_moore_searcher 2642c6217f2SLouis Dionne # error "__cpp_lib_boyer_moore_searcher should be defined in c++20" 2652c6217f2SLouis Dionne # endif 2662c6217f2SLouis Dionne # if __cpp_lib_boyer_moore_searcher != 201603L 2672c6217f2SLouis Dionne # error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++20" 2682c6217f2SLouis Dionne # endif 2692c6217f2SLouis Dionne 2702c6217f2SLouis Dionne # ifndef __cpp_lib_constexpr_functional 2712c6217f2SLouis Dionne # error "__cpp_lib_constexpr_functional should be defined in c++20" 2722c6217f2SLouis Dionne # endif 2732c6217f2SLouis Dionne # if __cpp_lib_constexpr_functional != 201907L 2742c6217f2SLouis Dionne # error "__cpp_lib_constexpr_functional should have the value 201907L in c++20" 2752c6217f2SLouis Dionne # endif 2762c6217f2SLouis Dionne 2773f05d044SMark de Wever # ifdef __cpp_lib_copyable_function 2783f05d044SMark de Wever # error "__cpp_lib_copyable_function should not be defined before c++26" 2793f05d044SMark de Wever # endif 2803f05d044SMark de Wever 2813f05d044SMark de Wever # ifdef __cpp_lib_function_ref 2823f05d044SMark de Wever # error "__cpp_lib_function_ref should not be defined before c++26" 2833f05d044SMark de Wever # endif 2843f05d044SMark de Wever 2852c6217f2SLouis Dionne # ifndef __cpp_lib_invoke 2862c6217f2SLouis Dionne # error "__cpp_lib_invoke should be defined in c++20" 2872c6217f2SLouis Dionne # endif 2882c6217f2SLouis Dionne # if __cpp_lib_invoke != 201411L 2892c6217f2SLouis Dionne # error "__cpp_lib_invoke should have the value 201411L in c++20" 2902c6217f2SLouis Dionne # endif 2912c6217f2SLouis Dionne 2922c6217f2SLouis Dionne # ifdef __cpp_lib_invoke_r 29371400505SMark de Wever # error "__cpp_lib_invoke_r should not be defined before c++23" 2942c6217f2SLouis Dionne # endif 2952c6217f2SLouis Dionne 2962c6217f2SLouis Dionne # ifdef __cpp_lib_move_only_function 29771400505SMark de Wever # error "__cpp_lib_move_only_function should not be defined before c++23" 2982c6217f2SLouis Dionne # endif 2992c6217f2SLouis Dionne 3002c6217f2SLouis Dionne # ifndef __cpp_lib_not_fn 3012c6217f2SLouis Dionne # error "__cpp_lib_not_fn should be defined in c++20" 3022c6217f2SLouis Dionne # endif 3032c6217f2SLouis Dionne # if __cpp_lib_not_fn != 201603L 3042c6217f2SLouis Dionne # error "__cpp_lib_not_fn should have the value 201603L in c++20" 3052c6217f2SLouis Dionne # endif 3062c6217f2SLouis Dionne 3072c6217f2SLouis Dionne # ifndef __cpp_lib_ranges 3082c6217f2SLouis Dionne # error "__cpp_lib_ranges should be defined in c++20" 3092c6217f2SLouis Dionne # endif 310026210e8SA. Jiang # if __cpp_lib_ranges != 202110L 311026210e8SA. Jiang # error "__cpp_lib_ranges should have the value 202110L in c++20" 3122c6217f2SLouis Dionne # endif 3132c6217f2SLouis Dionne 314b699a9baSLouis Dionne # ifdef __cpp_lib_reference_wrapper 315b699a9baSLouis Dionne # error "__cpp_lib_reference_wrapper should not be defined before c++26" 316b699a9baSLouis Dionne # endif 317b699a9baSLouis Dionne 3182c6217f2SLouis Dionne # ifndef __cpp_lib_result_of_sfinae 3192c6217f2SLouis Dionne # error "__cpp_lib_result_of_sfinae should be defined in c++20" 3202c6217f2SLouis Dionne # endif 3212c6217f2SLouis Dionne # if __cpp_lib_result_of_sfinae != 201210L 3222c6217f2SLouis Dionne # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++20" 3232c6217f2SLouis Dionne # endif 3242c6217f2SLouis Dionne 3252c6217f2SLouis Dionne # ifndef __cpp_lib_transparent_operators 3262c6217f2SLouis Dionne # error "__cpp_lib_transparent_operators should be defined in c++20" 3272c6217f2SLouis Dionne # endif 3282c6217f2SLouis Dionne # if __cpp_lib_transparent_operators != 201510L 3292c6217f2SLouis Dionne # error "__cpp_lib_transparent_operators should have the value 201510L in c++20" 3302c6217f2SLouis Dionne # endif 3312c6217f2SLouis Dionne 3322c6217f2SLouis Dionne # ifndef __cpp_lib_unwrap_ref 3332c6217f2SLouis Dionne # error "__cpp_lib_unwrap_ref should be defined in c++20" 3342c6217f2SLouis Dionne # endif 3352c6217f2SLouis Dionne # if __cpp_lib_unwrap_ref != 201811L 3362c6217f2SLouis Dionne # error "__cpp_lib_unwrap_ref should have the value 201811L in c++20" 3372c6217f2SLouis Dionne # endif 3382c6217f2SLouis Dionne 33900c97cbcSMark de Wever #elif TEST_STD_VER == 23 3402c6217f2SLouis Dionne 3412c6217f2SLouis Dionne # ifndef __cpp_lib_bind_back 34271400505SMark de Wever # error "__cpp_lib_bind_back should be defined in c++23" 3432c6217f2SLouis Dionne # endif 3442c6217f2SLouis Dionne # if __cpp_lib_bind_back != 202202L 34571400505SMark de Wever # error "__cpp_lib_bind_back should have the value 202202L in c++23" 3462c6217f2SLouis Dionne # endif 3472c6217f2SLouis Dionne 3482c6217f2SLouis Dionne # ifndef __cpp_lib_bind_front 34971400505SMark de Wever # error "__cpp_lib_bind_front should be defined in c++23" 3502c6217f2SLouis Dionne # endif 3512c6217f2SLouis Dionne # if __cpp_lib_bind_front != 201907L 35271400505SMark de Wever # error "__cpp_lib_bind_front should have the value 201907L in c++23" 3532c6217f2SLouis Dionne # endif 3542c6217f2SLouis Dionne 3552c6217f2SLouis Dionne # ifndef __cpp_lib_boyer_moore_searcher 35671400505SMark de Wever # error "__cpp_lib_boyer_moore_searcher should be defined in c++23" 3572c6217f2SLouis Dionne # endif 3582c6217f2SLouis Dionne # if __cpp_lib_boyer_moore_searcher != 201603L 35971400505SMark de Wever # error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++23" 3602c6217f2SLouis Dionne # endif 3612c6217f2SLouis Dionne 3622c6217f2SLouis Dionne # ifndef __cpp_lib_constexpr_functional 36371400505SMark de Wever # error "__cpp_lib_constexpr_functional should be defined in c++23" 3642c6217f2SLouis Dionne # endif 3652c6217f2SLouis Dionne # if __cpp_lib_constexpr_functional != 201907L 36671400505SMark de Wever # error "__cpp_lib_constexpr_functional should have the value 201907L in c++23" 3672c6217f2SLouis Dionne # endif 3682c6217f2SLouis Dionne 3693f05d044SMark de Wever # ifdef __cpp_lib_copyable_function 3703f05d044SMark de Wever # error "__cpp_lib_copyable_function should not be defined before c++26" 3713f05d044SMark de Wever # endif 3723f05d044SMark de Wever 3733f05d044SMark de Wever # ifdef __cpp_lib_function_ref 3743f05d044SMark de Wever # error "__cpp_lib_function_ref should not be defined before c++26" 3753f05d044SMark de Wever # endif 3763f05d044SMark de Wever 3772c6217f2SLouis Dionne # ifndef __cpp_lib_invoke 37871400505SMark de Wever # error "__cpp_lib_invoke should be defined in c++23" 3792c6217f2SLouis Dionne # endif 3802c6217f2SLouis Dionne # if __cpp_lib_invoke != 201411L 38171400505SMark de Wever # error "__cpp_lib_invoke should have the value 201411L in c++23" 3822c6217f2SLouis Dionne # endif 3832c6217f2SLouis Dionne 3842c6217f2SLouis Dionne # ifndef __cpp_lib_invoke_r 38571400505SMark de Wever # error "__cpp_lib_invoke_r should be defined in c++23" 3862c6217f2SLouis Dionne # endif 3872c6217f2SLouis Dionne # if __cpp_lib_invoke_r != 202106L 38871400505SMark de Wever # error "__cpp_lib_invoke_r should have the value 202106L in c++23" 3892c6217f2SLouis Dionne # endif 3902c6217f2SLouis Dionne 3912c6217f2SLouis Dionne # if !defined(_LIBCPP_VERSION) 3922c6217f2SLouis Dionne # ifndef __cpp_lib_move_only_function 39371400505SMark de Wever # error "__cpp_lib_move_only_function should be defined in c++23" 3942c6217f2SLouis Dionne # endif 3952c6217f2SLouis Dionne # if __cpp_lib_move_only_function != 202110L 39671400505SMark de Wever # error "__cpp_lib_move_only_function should have the value 202110L in c++23" 3972c6217f2SLouis Dionne # endif 3982c6217f2SLouis Dionne # else // _LIBCPP_VERSION 3992c6217f2SLouis Dionne # ifdef __cpp_lib_move_only_function 4002c6217f2SLouis Dionne # error "__cpp_lib_move_only_function should not be defined because it is unimplemented in libc++!" 4012c6217f2SLouis Dionne # endif 4022c6217f2SLouis Dionne # endif 4032c6217f2SLouis Dionne 4042c6217f2SLouis Dionne # ifndef __cpp_lib_not_fn 40571400505SMark de Wever # error "__cpp_lib_not_fn should be defined in c++23" 4062c6217f2SLouis Dionne # endif 4072c6217f2SLouis Dionne # if __cpp_lib_not_fn != 201603L 40871400505SMark de Wever # error "__cpp_lib_not_fn should have the value 201603L in c++23" 4092c6217f2SLouis Dionne # endif 4102c6217f2SLouis Dionne 4112c6217f2SLouis Dionne # ifndef __cpp_lib_ranges 41271400505SMark de Wever # error "__cpp_lib_ranges should be defined in c++23" 4132c6217f2SLouis Dionne # endif 414026210e8SA. Jiang # if __cpp_lib_ranges != 202406L 415026210e8SA. Jiang # error "__cpp_lib_ranges should have the value 202406L in c++23" 4162c6217f2SLouis Dionne # endif 4172c6217f2SLouis Dionne 418b699a9baSLouis Dionne # ifdef __cpp_lib_reference_wrapper 419b699a9baSLouis Dionne # error "__cpp_lib_reference_wrapper should not be defined before c++26" 420b699a9baSLouis Dionne # endif 421b699a9baSLouis Dionne 4222c6217f2SLouis Dionne # ifndef __cpp_lib_result_of_sfinae 42371400505SMark de Wever # error "__cpp_lib_result_of_sfinae should be defined in c++23" 4242c6217f2SLouis Dionne # endif 4252c6217f2SLouis Dionne # if __cpp_lib_result_of_sfinae != 201210L 42671400505SMark de Wever # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++23" 4272c6217f2SLouis Dionne # endif 4282c6217f2SLouis Dionne 4292c6217f2SLouis Dionne # ifndef __cpp_lib_transparent_operators 43071400505SMark de Wever # error "__cpp_lib_transparent_operators should be defined in c++23" 4312c6217f2SLouis Dionne # endif 4322c6217f2SLouis Dionne # if __cpp_lib_transparent_operators != 201510L 43371400505SMark de Wever # error "__cpp_lib_transparent_operators should have the value 201510L in c++23" 4342c6217f2SLouis Dionne # endif 4352c6217f2SLouis Dionne 4362c6217f2SLouis Dionne # ifndef __cpp_lib_unwrap_ref 43771400505SMark de Wever # error "__cpp_lib_unwrap_ref should be defined in c++23" 4382c6217f2SLouis Dionne # endif 4392c6217f2SLouis Dionne # if __cpp_lib_unwrap_ref != 201811L 44071400505SMark de Wever # error "__cpp_lib_unwrap_ref should have the value 201811L in c++23" 4412c6217f2SLouis Dionne # endif 4422c6217f2SLouis Dionne 44300c97cbcSMark de Wever #elif TEST_STD_VER > 23 44400c97cbcSMark de Wever 44500c97cbcSMark de Wever # ifndef __cpp_lib_bind_back 44600c97cbcSMark de Wever # error "__cpp_lib_bind_back should be defined in c++26" 44700c97cbcSMark de Wever # endif 448c8917048SJakub Mazurkiewicz # if __cpp_lib_bind_back != 202202L 449c8917048SJakub Mazurkiewicz # error "__cpp_lib_bind_back should have the value 202202L in c++26" 45000c97cbcSMark de Wever # endif 45100c97cbcSMark de Wever 45200c97cbcSMark de Wever # ifndef __cpp_lib_bind_front 45300c97cbcSMark de Wever # error "__cpp_lib_bind_front should be defined in c++26" 45400c97cbcSMark de Wever # endif 4553f05d044SMark de Wever # if __cpp_lib_bind_front != 202306L 4563f05d044SMark de Wever # error "__cpp_lib_bind_front should have the value 202306L in c++26" 45700c97cbcSMark de Wever # endif 45800c97cbcSMark de Wever 45900c97cbcSMark de Wever # ifndef __cpp_lib_boyer_moore_searcher 46000c97cbcSMark de Wever # error "__cpp_lib_boyer_moore_searcher should be defined in c++26" 46100c97cbcSMark de Wever # endif 46200c97cbcSMark de Wever # if __cpp_lib_boyer_moore_searcher != 201603L 46300c97cbcSMark de Wever # error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++26" 46400c97cbcSMark de Wever # endif 46500c97cbcSMark de Wever 46600c97cbcSMark de Wever # ifndef __cpp_lib_constexpr_functional 46700c97cbcSMark de Wever # error "__cpp_lib_constexpr_functional should be defined in c++26" 46800c97cbcSMark de Wever # endif 46900c97cbcSMark de Wever # if __cpp_lib_constexpr_functional != 201907L 47000c97cbcSMark de Wever # error "__cpp_lib_constexpr_functional should have the value 201907L in c++26" 47100c97cbcSMark de Wever # endif 47200c97cbcSMark de Wever 4733f05d044SMark de Wever # if !defined(_LIBCPP_VERSION) 4743f05d044SMark de Wever # ifndef __cpp_lib_copyable_function 4753f05d044SMark de Wever # error "__cpp_lib_copyable_function should be defined in c++26" 4763f05d044SMark de Wever # endif 4773f05d044SMark de Wever # if __cpp_lib_copyable_function != 202306L 4783f05d044SMark de Wever # error "__cpp_lib_copyable_function should have the value 202306L in c++26" 4793f05d044SMark de Wever # endif 4803f05d044SMark de Wever # else // _LIBCPP_VERSION 4813f05d044SMark de Wever # ifdef __cpp_lib_copyable_function 4823f05d044SMark de Wever # error "__cpp_lib_copyable_function should not be defined because it is unimplemented in libc++!" 4833f05d044SMark de Wever # endif 4843f05d044SMark de Wever # endif 4853f05d044SMark de Wever 4863f05d044SMark de Wever # if !defined(_LIBCPP_VERSION) 4873f05d044SMark de Wever # ifndef __cpp_lib_function_ref 4883f05d044SMark de Wever # error "__cpp_lib_function_ref should be defined in c++26" 4893f05d044SMark de Wever # endif 4903f05d044SMark de Wever # if __cpp_lib_function_ref != 202306L 4913f05d044SMark de Wever # error "__cpp_lib_function_ref should have the value 202306L in c++26" 4923f05d044SMark de Wever # endif 4933f05d044SMark de Wever # else // _LIBCPP_VERSION 4943f05d044SMark de Wever # ifdef __cpp_lib_function_ref 4953f05d044SMark de Wever # error "__cpp_lib_function_ref should not be defined because it is unimplemented in libc++!" 4963f05d044SMark de Wever # endif 4973f05d044SMark de Wever # endif 4983f05d044SMark de Wever 49900c97cbcSMark de Wever # ifndef __cpp_lib_invoke 50000c97cbcSMark de Wever # error "__cpp_lib_invoke should be defined in c++26" 50100c97cbcSMark de Wever # endif 50200c97cbcSMark de Wever # if __cpp_lib_invoke != 201411L 50300c97cbcSMark de Wever # error "__cpp_lib_invoke should have the value 201411L in c++26" 50400c97cbcSMark de Wever # endif 50500c97cbcSMark de Wever 50600c97cbcSMark de Wever # ifndef __cpp_lib_invoke_r 50700c97cbcSMark de Wever # error "__cpp_lib_invoke_r should be defined in c++26" 50800c97cbcSMark de Wever # endif 50900c97cbcSMark de Wever # if __cpp_lib_invoke_r != 202106L 51000c97cbcSMark de Wever # error "__cpp_lib_invoke_r should have the value 202106L in c++26" 51100c97cbcSMark de Wever # endif 51200c97cbcSMark de Wever 51300c97cbcSMark de Wever # if !defined(_LIBCPP_VERSION) 51400c97cbcSMark de Wever # ifndef __cpp_lib_move_only_function 51500c97cbcSMark de Wever # error "__cpp_lib_move_only_function should be defined in c++26" 51600c97cbcSMark de Wever # endif 51700c97cbcSMark de Wever # if __cpp_lib_move_only_function != 202110L 51800c97cbcSMark de Wever # error "__cpp_lib_move_only_function should have the value 202110L in c++26" 51900c97cbcSMark de Wever # endif 52000c97cbcSMark de Wever # else // _LIBCPP_VERSION 52100c97cbcSMark de Wever # ifdef __cpp_lib_move_only_function 52200c97cbcSMark de Wever # error "__cpp_lib_move_only_function should not be defined because it is unimplemented in libc++!" 52300c97cbcSMark de Wever # endif 52400c97cbcSMark de Wever # endif 52500c97cbcSMark de Wever 52600c97cbcSMark de Wever # ifndef __cpp_lib_not_fn 52700c97cbcSMark de Wever # error "__cpp_lib_not_fn should be defined in c++26" 52800c97cbcSMark de Wever # endif 529*c91d805eSJakub Mazurkiewicz # if __cpp_lib_not_fn != 202306L 530*c91d805eSJakub Mazurkiewicz # error "__cpp_lib_not_fn should have the value 202306L in c++26" 53100c97cbcSMark de Wever # endif 53200c97cbcSMark de Wever 53300c97cbcSMark de Wever # ifndef __cpp_lib_ranges 53400c97cbcSMark de Wever # error "__cpp_lib_ranges should be defined in c++26" 53500c97cbcSMark de Wever # endif 536026210e8SA. Jiang # if __cpp_lib_ranges != 202406L 537026210e8SA. Jiang # error "__cpp_lib_ranges should have the value 202406L in c++26" 53800c97cbcSMark de Wever # endif 53900c97cbcSMark de Wever 540b699a9baSLouis Dionne # ifndef __cpp_lib_reference_wrapper 541b699a9baSLouis Dionne # error "__cpp_lib_reference_wrapper should be defined in c++26" 542b699a9baSLouis Dionne # endif 543b699a9baSLouis Dionne # if __cpp_lib_reference_wrapper != 202403L 544b699a9baSLouis Dionne # error "__cpp_lib_reference_wrapper should have the value 202403L in c++26" 545b699a9baSLouis Dionne # endif 546b699a9baSLouis Dionne 54700c97cbcSMark de Wever # ifndef __cpp_lib_result_of_sfinae 54800c97cbcSMark de Wever # error "__cpp_lib_result_of_sfinae should be defined in c++26" 54900c97cbcSMark de Wever # endif 55000c97cbcSMark de Wever # if __cpp_lib_result_of_sfinae != 201210L 55100c97cbcSMark de Wever # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++26" 55200c97cbcSMark de Wever # endif 55300c97cbcSMark de Wever 55400c97cbcSMark de Wever # ifndef __cpp_lib_transparent_operators 55500c97cbcSMark de Wever # error "__cpp_lib_transparent_operators should be defined in c++26" 55600c97cbcSMark de Wever # endif 55700c97cbcSMark de Wever # if __cpp_lib_transparent_operators != 201510L 55800c97cbcSMark de Wever # error "__cpp_lib_transparent_operators should have the value 201510L in c++26" 55900c97cbcSMark de Wever # endif 56000c97cbcSMark de Wever 56100c97cbcSMark de Wever # ifndef __cpp_lib_unwrap_ref 56200c97cbcSMark de Wever # error "__cpp_lib_unwrap_ref should be defined in c++26" 56300c97cbcSMark de Wever # endif 56400c97cbcSMark de Wever # if __cpp_lib_unwrap_ref != 201811L 56500c97cbcSMark de Wever # error "__cpp_lib_unwrap_ref should have the value 201811L in c++26" 56600c97cbcSMark de Wever # endif 56700c97cbcSMark de Wever 56800c97cbcSMark de Wever #endif // TEST_STD_VER > 23 5692c6217f2SLouis Dionne 570