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 // <string> 152c6217f2SLouis Dionne 162c6217f2SLouis Dionne // Test the feature test macros defined by <string> 172c6217f2SLouis Dionne 182c6217f2SLouis Dionne /* Constant Value 192c6217f2SLouis Dionne __cpp_lib_allocator_traits_is_always_equal 201411L [C++17] 20309aed30SNikolas Klauser __cpp_lib_char8_t 201907L [C++20] 21425620ccSNikolas Klauser __cpp_lib_constexpr_string 201907L [C++20] 22028f1b07Skrzysdz __cpp_lib_containers_ranges 202202L [C++23] 23b699a9baSLouis Dionne __cpp_lib_default_template_type_for_algorithm_values 202403L [C++26] 242c6217f2SLouis Dionne __cpp_lib_erase_if 202002L [C++20] 252c6217f2SLouis Dionne __cpp_lib_nonmember_container_access 201411L [C++17] 262c6217f2SLouis Dionne __cpp_lib_starts_ends_with 201711L [C++20] 2771400505SMark de Wever __cpp_lib_string_contains 202011L [C++23] 2871400505SMark de Wever __cpp_lib_string_resize_and_overwrite 202110L [C++23] 292c6217f2SLouis Dionne __cpp_lib_string_udls 201304L [C++14] 302c6217f2SLouis Dionne __cpp_lib_string_view 201606L [C++17] 312c6217f2SLouis Dionne 201803L [C++20] 32*4a19be5dSHristo Hristov 202403L [C++26] 33a4bef0caSStephan T. Lavavej __cpp_lib_to_string 202306L [C++26] 342c6217f2SLouis Dionne */ 352c6217f2SLouis Dionne 362c6217f2SLouis Dionne #include <string> 372c6217f2SLouis Dionne #include "test_macros.h" 382c6217f2SLouis Dionne 392c6217f2SLouis Dionne #if TEST_STD_VER < 14 402c6217f2SLouis Dionne 412c6217f2SLouis Dionne # ifdef __cpp_lib_allocator_traits_is_always_equal 422c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 432c6217f2SLouis Dionne # endif 442c6217f2SLouis Dionne 452c6217f2SLouis Dionne # ifdef __cpp_lib_char8_t 462c6217f2SLouis Dionne # error "__cpp_lib_char8_t should not be defined before c++20" 472c6217f2SLouis Dionne # endif 482c6217f2SLouis Dionne 492c6217f2SLouis Dionne # ifdef __cpp_lib_constexpr_string 502c6217f2SLouis Dionne # error "__cpp_lib_constexpr_string should not be defined before c++20" 512c6217f2SLouis Dionne # endif 522c6217f2SLouis Dionne 53028f1b07Skrzysdz # ifdef __cpp_lib_containers_ranges 54028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should not be defined before c++23" 55028f1b07Skrzysdz # endif 56028f1b07Skrzysdz 57b699a9baSLouis Dionne # ifdef __cpp_lib_default_template_type_for_algorithm_values 58b699a9baSLouis Dionne # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26" 59b699a9baSLouis Dionne # endif 60b699a9baSLouis Dionne 612c6217f2SLouis Dionne # ifdef __cpp_lib_erase_if 622c6217f2SLouis Dionne # error "__cpp_lib_erase_if should not be defined before c++20" 632c6217f2SLouis Dionne # endif 642c6217f2SLouis Dionne 652c6217f2SLouis Dionne # ifdef __cpp_lib_nonmember_container_access 662c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 672c6217f2SLouis Dionne # endif 682c6217f2SLouis Dionne 692c6217f2SLouis Dionne # ifdef __cpp_lib_starts_ends_with 702c6217f2SLouis Dionne # error "__cpp_lib_starts_ends_with should not be defined before c++20" 712c6217f2SLouis Dionne # endif 722c6217f2SLouis Dionne 732c6217f2SLouis Dionne # ifdef __cpp_lib_string_contains 7471400505SMark de Wever # error "__cpp_lib_string_contains should not be defined before c++23" 752c6217f2SLouis Dionne # endif 762c6217f2SLouis Dionne 772c6217f2SLouis Dionne # ifdef __cpp_lib_string_resize_and_overwrite 7871400505SMark de Wever # error "__cpp_lib_string_resize_and_overwrite should not be defined before c++23" 792c6217f2SLouis Dionne # endif 802c6217f2SLouis Dionne 812c6217f2SLouis Dionne # ifdef __cpp_lib_string_udls 822c6217f2SLouis Dionne # error "__cpp_lib_string_udls should not be defined before c++14" 832c6217f2SLouis Dionne # endif 842c6217f2SLouis Dionne 852c6217f2SLouis Dionne # ifdef __cpp_lib_string_view 862c6217f2SLouis Dionne # error "__cpp_lib_string_view should not be defined before c++17" 872c6217f2SLouis Dionne # endif 882c6217f2SLouis Dionne 893f05d044SMark de Wever # ifdef __cpp_lib_to_string 90a4bef0caSStephan T. Lavavej # error "__cpp_lib_to_string should not be defined before c++26" 913f05d044SMark de Wever # endif 923f05d044SMark de Wever 932c6217f2SLouis Dionne #elif TEST_STD_VER == 14 942c6217f2SLouis Dionne 952c6217f2SLouis Dionne # ifdef __cpp_lib_allocator_traits_is_always_equal 962c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 972c6217f2SLouis Dionne # endif 982c6217f2SLouis Dionne 992c6217f2SLouis Dionne # ifdef __cpp_lib_char8_t 1002c6217f2SLouis Dionne # error "__cpp_lib_char8_t should not be defined before c++20" 1012c6217f2SLouis Dionne # endif 1022c6217f2SLouis Dionne 1032c6217f2SLouis Dionne # ifdef __cpp_lib_constexpr_string 1042c6217f2SLouis Dionne # error "__cpp_lib_constexpr_string should not be defined before c++20" 1052c6217f2SLouis Dionne # endif 1062c6217f2SLouis Dionne 107028f1b07Skrzysdz # ifdef __cpp_lib_containers_ranges 108028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should not be defined before c++23" 109028f1b07Skrzysdz # endif 110028f1b07Skrzysdz 111b699a9baSLouis Dionne # ifdef __cpp_lib_default_template_type_for_algorithm_values 112b699a9baSLouis Dionne # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26" 113b699a9baSLouis Dionne # endif 114b699a9baSLouis Dionne 1152c6217f2SLouis Dionne # ifdef __cpp_lib_erase_if 1162c6217f2SLouis Dionne # error "__cpp_lib_erase_if should not be defined before c++20" 1172c6217f2SLouis Dionne # endif 1182c6217f2SLouis Dionne 1192c6217f2SLouis Dionne # ifdef __cpp_lib_nonmember_container_access 1202c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 1212c6217f2SLouis Dionne # endif 1222c6217f2SLouis Dionne 1232c6217f2SLouis Dionne # ifdef __cpp_lib_starts_ends_with 1242c6217f2SLouis Dionne # error "__cpp_lib_starts_ends_with should not be defined before c++20" 1252c6217f2SLouis Dionne # endif 1262c6217f2SLouis Dionne 1272c6217f2SLouis Dionne # ifdef __cpp_lib_string_contains 12871400505SMark de Wever # error "__cpp_lib_string_contains should not be defined before c++23" 1292c6217f2SLouis Dionne # endif 1302c6217f2SLouis Dionne 1312c6217f2SLouis Dionne # ifdef __cpp_lib_string_resize_and_overwrite 13271400505SMark de Wever # error "__cpp_lib_string_resize_and_overwrite should not be defined before c++23" 1332c6217f2SLouis Dionne # endif 1342c6217f2SLouis Dionne 1352c6217f2SLouis Dionne # ifndef __cpp_lib_string_udls 1362c6217f2SLouis Dionne # error "__cpp_lib_string_udls should be defined in c++14" 1372c6217f2SLouis Dionne # endif 1382c6217f2SLouis Dionne # if __cpp_lib_string_udls != 201304L 1392c6217f2SLouis Dionne # error "__cpp_lib_string_udls should have the value 201304L in c++14" 1402c6217f2SLouis Dionne # endif 1412c6217f2SLouis Dionne 1422c6217f2SLouis Dionne # ifdef __cpp_lib_string_view 1432c6217f2SLouis Dionne # error "__cpp_lib_string_view should not be defined before c++17" 1442c6217f2SLouis Dionne # endif 1452c6217f2SLouis Dionne 1463f05d044SMark de Wever # ifdef __cpp_lib_to_string 147a4bef0caSStephan T. Lavavej # error "__cpp_lib_to_string should not be defined before c++26" 1483f05d044SMark de Wever # endif 1493f05d044SMark de Wever 1502c6217f2SLouis Dionne #elif TEST_STD_VER == 17 1512c6217f2SLouis Dionne 1522c6217f2SLouis Dionne # ifndef __cpp_lib_allocator_traits_is_always_equal 1532c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 1542c6217f2SLouis Dionne # endif 1552c6217f2SLouis Dionne # if __cpp_lib_allocator_traits_is_always_equal != 201411L 1562c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 1572c6217f2SLouis Dionne # endif 1582c6217f2SLouis Dionne 1592c6217f2SLouis Dionne # ifdef __cpp_lib_char8_t 1602c6217f2SLouis Dionne # error "__cpp_lib_char8_t should not be defined before c++20" 1612c6217f2SLouis Dionne # endif 1622c6217f2SLouis Dionne 1632c6217f2SLouis Dionne # ifdef __cpp_lib_constexpr_string 1642c6217f2SLouis Dionne # error "__cpp_lib_constexpr_string should not be defined before c++20" 1652c6217f2SLouis Dionne # endif 1662c6217f2SLouis Dionne 167028f1b07Skrzysdz # ifdef __cpp_lib_containers_ranges 168028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should not be defined before c++23" 169028f1b07Skrzysdz # endif 170028f1b07Skrzysdz 171b699a9baSLouis Dionne # ifdef __cpp_lib_default_template_type_for_algorithm_values 172b699a9baSLouis Dionne # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26" 173b699a9baSLouis Dionne # endif 174b699a9baSLouis Dionne 1752c6217f2SLouis Dionne # ifdef __cpp_lib_erase_if 1762c6217f2SLouis Dionne # error "__cpp_lib_erase_if should not be defined before c++20" 1772c6217f2SLouis Dionne # endif 1782c6217f2SLouis Dionne 1792c6217f2SLouis Dionne # ifndef __cpp_lib_nonmember_container_access 1802c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should be defined in c++17" 1812c6217f2SLouis Dionne # endif 1822c6217f2SLouis Dionne # if __cpp_lib_nonmember_container_access != 201411L 1832c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 1842c6217f2SLouis Dionne # endif 1852c6217f2SLouis Dionne 1862c6217f2SLouis Dionne # ifdef __cpp_lib_starts_ends_with 1872c6217f2SLouis Dionne # error "__cpp_lib_starts_ends_with should not be defined before c++20" 1882c6217f2SLouis Dionne # endif 1892c6217f2SLouis Dionne 1902c6217f2SLouis Dionne # ifdef __cpp_lib_string_contains 19171400505SMark de Wever # error "__cpp_lib_string_contains should not be defined before c++23" 1922c6217f2SLouis Dionne # endif 1932c6217f2SLouis Dionne 1942c6217f2SLouis Dionne # ifdef __cpp_lib_string_resize_and_overwrite 19571400505SMark de Wever # error "__cpp_lib_string_resize_and_overwrite should not be defined before c++23" 1962c6217f2SLouis Dionne # endif 1972c6217f2SLouis Dionne 1982c6217f2SLouis Dionne # ifndef __cpp_lib_string_udls 1992c6217f2SLouis Dionne # error "__cpp_lib_string_udls should be defined in c++17" 2002c6217f2SLouis Dionne # endif 2012c6217f2SLouis Dionne # if __cpp_lib_string_udls != 201304L 2022c6217f2SLouis Dionne # error "__cpp_lib_string_udls should have the value 201304L in c++17" 2032c6217f2SLouis Dionne # endif 2042c6217f2SLouis Dionne 2052c6217f2SLouis Dionne # ifndef __cpp_lib_string_view 2062c6217f2SLouis Dionne # error "__cpp_lib_string_view should be defined in c++17" 2072c6217f2SLouis Dionne # endif 2082c6217f2SLouis Dionne # if __cpp_lib_string_view != 201606L 2092c6217f2SLouis Dionne # error "__cpp_lib_string_view should have the value 201606L in c++17" 2102c6217f2SLouis Dionne # endif 2112c6217f2SLouis Dionne 2123f05d044SMark de Wever # ifdef __cpp_lib_to_string 213a4bef0caSStephan T. Lavavej # error "__cpp_lib_to_string should not be defined before c++26" 2143f05d044SMark de Wever # endif 2153f05d044SMark de Wever 2162c6217f2SLouis Dionne #elif TEST_STD_VER == 20 2172c6217f2SLouis Dionne 2182c6217f2SLouis Dionne # ifndef __cpp_lib_allocator_traits_is_always_equal 2192c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20" 2202c6217f2SLouis Dionne # endif 2212c6217f2SLouis Dionne # if __cpp_lib_allocator_traits_is_always_equal != 201411L 2222c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20" 2232c6217f2SLouis Dionne # endif 2242c6217f2SLouis Dionne 2252c6217f2SLouis Dionne # if defined(__cpp_char8_t) 2262c6217f2SLouis Dionne # ifndef __cpp_lib_char8_t 2272c6217f2SLouis Dionne # error "__cpp_lib_char8_t should be defined in c++20" 2282c6217f2SLouis Dionne # endif 229309aed30SNikolas Klauser # if __cpp_lib_char8_t != 201907L 230309aed30SNikolas Klauser # error "__cpp_lib_char8_t should have the value 201907L in c++20" 2312c6217f2SLouis Dionne # endif 2322c6217f2SLouis Dionne # else 2332c6217f2SLouis Dionne # ifdef __cpp_lib_char8_t 234a72f6b03SMark de Wever # error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!" 2352c6217f2SLouis Dionne # endif 2362c6217f2SLouis Dionne # endif 2372c6217f2SLouis Dionne 2382c6217f2SLouis Dionne # ifndef __cpp_lib_constexpr_string 2392c6217f2SLouis Dionne # error "__cpp_lib_constexpr_string should be defined in c++20" 2402c6217f2SLouis Dionne # endif 241425620ccSNikolas Klauser # if __cpp_lib_constexpr_string != 201907L 242425620ccSNikolas Klauser # error "__cpp_lib_constexpr_string should have the value 201907L in c++20" 2432c6217f2SLouis Dionne # endif 2442c6217f2SLouis Dionne 245028f1b07Skrzysdz # ifdef __cpp_lib_containers_ranges 246028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should not be defined before c++23" 247028f1b07Skrzysdz # endif 248028f1b07Skrzysdz 249b699a9baSLouis Dionne # ifdef __cpp_lib_default_template_type_for_algorithm_values 250b699a9baSLouis Dionne # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26" 251b699a9baSLouis Dionne # endif 252b699a9baSLouis Dionne 2532c6217f2SLouis Dionne # ifndef __cpp_lib_erase_if 2542c6217f2SLouis Dionne # error "__cpp_lib_erase_if should be defined in c++20" 2552c6217f2SLouis Dionne # endif 2562c6217f2SLouis Dionne # if __cpp_lib_erase_if != 202002L 2572c6217f2SLouis Dionne # error "__cpp_lib_erase_if should have the value 202002L in c++20" 2582c6217f2SLouis Dionne # endif 2592c6217f2SLouis Dionne 2602c6217f2SLouis Dionne # ifndef __cpp_lib_nonmember_container_access 2612c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should be defined in c++20" 2622c6217f2SLouis Dionne # endif 2632c6217f2SLouis Dionne # if __cpp_lib_nonmember_container_access != 201411L 2642c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" 2652c6217f2SLouis Dionne # endif 2662c6217f2SLouis Dionne 2672c6217f2SLouis Dionne # ifndef __cpp_lib_starts_ends_with 2682c6217f2SLouis Dionne # error "__cpp_lib_starts_ends_with should be defined in c++20" 2692c6217f2SLouis Dionne # endif 2702c6217f2SLouis Dionne # if __cpp_lib_starts_ends_with != 201711L 2712c6217f2SLouis Dionne # error "__cpp_lib_starts_ends_with should have the value 201711L in c++20" 2722c6217f2SLouis Dionne # endif 2732c6217f2SLouis Dionne 2742c6217f2SLouis Dionne # ifdef __cpp_lib_string_contains 27571400505SMark de Wever # error "__cpp_lib_string_contains should not be defined before c++23" 2762c6217f2SLouis Dionne # endif 2772c6217f2SLouis Dionne 2782c6217f2SLouis Dionne # ifdef __cpp_lib_string_resize_and_overwrite 27971400505SMark de Wever # error "__cpp_lib_string_resize_and_overwrite should not be defined before c++23" 2802c6217f2SLouis Dionne # endif 2812c6217f2SLouis Dionne 2822c6217f2SLouis Dionne # ifndef __cpp_lib_string_udls 2832c6217f2SLouis Dionne # error "__cpp_lib_string_udls should be defined in c++20" 2842c6217f2SLouis Dionne # endif 2852c6217f2SLouis Dionne # if __cpp_lib_string_udls != 201304L 2862c6217f2SLouis Dionne # error "__cpp_lib_string_udls should have the value 201304L in c++20" 2872c6217f2SLouis Dionne # endif 2882c6217f2SLouis Dionne 2892c6217f2SLouis Dionne # ifndef __cpp_lib_string_view 2902c6217f2SLouis Dionne # error "__cpp_lib_string_view should be defined in c++20" 2912c6217f2SLouis Dionne # endif 2922c6217f2SLouis Dionne # if __cpp_lib_string_view != 201803L 2932c6217f2SLouis Dionne # error "__cpp_lib_string_view should have the value 201803L in c++20" 2942c6217f2SLouis Dionne # endif 2952c6217f2SLouis Dionne 2963f05d044SMark de Wever # ifdef __cpp_lib_to_string 297a4bef0caSStephan T. Lavavej # error "__cpp_lib_to_string should not be defined before c++26" 2983f05d044SMark de Wever # endif 2993f05d044SMark de Wever 30000c97cbcSMark de Wever #elif TEST_STD_VER == 23 3012c6217f2SLouis Dionne 3022c6217f2SLouis Dionne # ifndef __cpp_lib_allocator_traits_is_always_equal 30371400505SMark de Wever # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23" 3042c6217f2SLouis Dionne # endif 3052c6217f2SLouis Dionne # if __cpp_lib_allocator_traits_is_always_equal != 201411L 30671400505SMark de Wever # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++23" 3072c6217f2SLouis Dionne # endif 3082c6217f2SLouis Dionne 3092c6217f2SLouis Dionne # if defined(__cpp_char8_t) 3102c6217f2SLouis Dionne # ifndef __cpp_lib_char8_t 31171400505SMark de Wever # error "__cpp_lib_char8_t should be defined in c++23" 3122c6217f2SLouis Dionne # endif 313309aed30SNikolas Klauser # if __cpp_lib_char8_t != 201907L 31471400505SMark de Wever # error "__cpp_lib_char8_t should have the value 201907L in c++23" 3152c6217f2SLouis Dionne # endif 3162c6217f2SLouis Dionne # else 3172c6217f2SLouis Dionne # ifdef __cpp_lib_char8_t 318a72f6b03SMark de Wever # error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!" 3192c6217f2SLouis Dionne # endif 3202c6217f2SLouis Dionne # endif 3212c6217f2SLouis Dionne 3222c6217f2SLouis Dionne # ifndef __cpp_lib_constexpr_string 32371400505SMark de Wever # error "__cpp_lib_constexpr_string should be defined in c++23" 3242c6217f2SLouis Dionne # endif 325425620ccSNikolas Klauser # if __cpp_lib_constexpr_string != 201907L 32671400505SMark de Wever # error "__cpp_lib_constexpr_string should have the value 201907L in c++23" 3272c6217f2SLouis Dionne # endif 3282c6217f2SLouis Dionne 329028f1b07Skrzysdz # ifndef __cpp_lib_containers_ranges 330028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should be defined in c++23" 331028f1b07Skrzysdz # endif 332028f1b07Skrzysdz # if __cpp_lib_containers_ranges != 202202L 333028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should have the value 202202L in c++23" 334028f1b07Skrzysdz # endif 335028f1b07Skrzysdz 336b699a9baSLouis Dionne # ifdef __cpp_lib_default_template_type_for_algorithm_values 337b699a9baSLouis Dionne # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26" 338b699a9baSLouis Dionne # endif 339b699a9baSLouis Dionne 3402c6217f2SLouis Dionne # ifndef __cpp_lib_erase_if 34171400505SMark de Wever # error "__cpp_lib_erase_if should be defined in c++23" 3422c6217f2SLouis Dionne # endif 3432c6217f2SLouis Dionne # if __cpp_lib_erase_if != 202002L 34471400505SMark de Wever # error "__cpp_lib_erase_if should have the value 202002L in c++23" 3452c6217f2SLouis Dionne # endif 3462c6217f2SLouis Dionne 3472c6217f2SLouis Dionne # ifndef __cpp_lib_nonmember_container_access 34871400505SMark de Wever # error "__cpp_lib_nonmember_container_access should be defined in c++23" 3492c6217f2SLouis Dionne # endif 3502c6217f2SLouis Dionne # if __cpp_lib_nonmember_container_access != 201411L 35171400505SMark de Wever # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23" 3522c6217f2SLouis Dionne # endif 3532c6217f2SLouis Dionne 3542c6217f2SLouis Dionne # ifndef __cpp_lib_starts_ends_with 35571400505SMark de Wever # error "__cpp_lib_starts_ends_with should be defined in c++23" 3562c6217f2SLouis Dionne # endif 3572c6217f2SLouis Dionne # if __cpp_lib_starts_ends_with != 201711L 35871400505SMark de Wever # error "__cpp_lib_starts_ends_with should have the value 201711L in c++23" 3592c6217f2SLouis Dionne # endif 3602c6217f2SLouis Dionne 3612c6217f2SLouis Dionne # ifndef __cpp_lib_string_contains 36271400505SMark de Wever # error "__cpp_lib_string_contains should be defined in c++23" 3632c6217f2SLouis Dionne # endif 3642c6217f2SLouis Dionne # if __cpp_lib_string_contains != 202011L 36571400505SMark de Wever # error "__cpp_lib_string_contains should have the value 202011L in c++23" 3662c6217f2SLouis Dionne # endif 3672c6217f2SLouis Dionne 3682c6217f2SLouis Dionne # ifndef __cpp_lib_string_resize_and_overwrite 36971400505SMark de Wever # error "__cpp_lib_string_resize_and_overwrite should be defined in c++23" 3702c6217f2SLouis Dionne # endif 3712c6217f2SLouis Dionne # if __cpp_lib_string_resize_and_overwrite != 202110L 37271400505SMark de Wever # error "__cpp_lib_string_resize_and_overwrite should have the value 202110L in c++23" 3732c6217f2SLouis Dionne # endif 3742c6217f2SLouis Dionne 3752c6217f2SLouis Dionne # ifndef __cpp_lib_string_udls 37671400505SMark de Wever # error "__cpp_lib_string_udls should be defined in c++23" 3772c6217f2SLouis Dionne # endif 3782c6217f2SLouis Dionne # if __cpp_lib_string_udls != 201304L 37971400505SMark de Wever # error "__cpp_lib_string_udls should have the value 201304L in c++23" 3802c6217f2SLouis Dionne # endif 3812c6217f2SLouis Dionne 3822c6217f2SLouis Dionne # ifndef __cpp_lib_string_view 38371400505SMark de Wever # error "__cpp_lib_string_view should be defined in c++23" 3842c6217f2SLouis Dionne # endif 3852c6217f2SLouis Dionne # if __cpp_lib_string_view != 201803L 38671400505SMark de Wever # error "__cpp_lib_string_view should have the value 201803L in c++23" 3872c6217f2SLouis Dionne # endif 3882c6217f2SLouis Dionne 3893f05d044SMark de Wever # ifdef __cpp_lib_to_string 390a4bef0caSStephan T. Lavavej # error "__cpp_lib_to_string should not be defined before c++26" 3913f05d044SMark de Wever # endif 3923f05d044SMark de Wever 39300c97cbcSMark de Wever #elif TEST_STD_VER > 23 39400c97cbcSMark de Wever 39500c97cbcSMark de Wever # ifndef __cpp_lib_allocator_traits_is_always_equal 39600c97cbcSMark de Wever # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26" 39700c97cbcSMark de Wever # endif 39800c97cbcSMark de Wever # if __cpp_lib_allocator_traits_is_always_equal != 201411L 39900c97cbcSMark de Wever # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26" 40000c97cbcSMark de Wever # endif 40100c97cbcSMark de Wever 40200c97cbcSMark de Wever # if defined(__cpp_char8_t) 40300c97cbcSMark de Wever # ifndef __cpp_lib_char8_t 40400c97cbcSMark de Wever # error "__cpp_lib_char8_t should be defined in c++26" 40500c97cbcSMark de Wever # endif 40600c97cbcSMark de Wever # if __cpp_lib_char8_t != 201907L 40700c97cbcSMark de Wever # error "__cpp_lib_char8_t should have the value 201907L in c++26" 40800c97cbcSMark de Wever # endif 40900c97cbcSMark de Wever # else 41000c97cbcSMark de Wever # ifdef __cpp_lib_char8_t 41100c97cbcSMark de Wever # error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!" 41200c97cbcSMark de Wever # endif 41300c97cbcSMark de Wever # endif 41400c97cbcSMark de Wever 41500c97cbcSMark de Wever # ifndef __cpp_lib_constexpr_string 41600c97cbcSMark de Wever # error "__cpp_lib_constexpr_string should be defined in c++26" 41700c97cbcSMark de Wever # endif 41800c97cbcSMark de Wever # if __cpp_lib_constexpr_string != 201907L 41900c97cbcSMark de Wever # error "__cpp_lib_constexpr_string should have the value 201907L in c++26" 42000c97cbcSMark de Wever # endif 42100c97cbcSMark de Wever 422028f1b07Skrzysdz # ifndef __cpp_lib_containers_ranges 423028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should be defined in c++26" 424028f1b07Skrzysdz # endif 425028f1b07Skrzysdz # if __cpp_lib_containers_ranges != 202202L 426028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should have the value 202202L in c++26" 427028f1b07Skrzysdz # endif 428028f1b07Skrzysdz 429b699a9baSLouis Dionne # if !defined(_LIBCPP_VERSION) 430b699a9baSLouis Dionne # ifndef __cpp_lib_default_template_type_for_algorithm_values 431b699a9baSLouis Dionne # error "__cpp_lib_default_template_type_for_algorithm_values should be defined in c++26" 432b699a9baSLouis Dionne # endif 433b699a9baSLouis Dionne # if __cpp_lib_default_template_type_for_algorithm_values != 202403L 434b699a9baSLouis Dionne # error "__cpp_lib_default_template_type_for_algorithm_values should have the value 202403L in c++26" 435b699a9baSLouis Dionne # endif 436b699a9baSLouis Dionne # else // _LIBCPP_VERSION 437b699a9baSLouis Dionne # ifdef __cpp_lib_default_template_type_for_algorithm_values 438b699a9baSLouis Dionne # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined because it is unimplemented in libc++!" 439b699a9baSLouis Dionne # endif 440b699a9baSLouis Dionne # endif 441b699a9baSLouis Dionne 44200c97cbcSMark de Wever # ifndef __cpp_lib_erase_if 44300c97cbcSMark de Wever # error "__cpp_lib_erase_if should be defined in c++26" 44400c97cbcSMark de Wever # endif 44500c97cbcSMark de Wever # if __cpp_lib_erase_if != 202002L 44600c97cbcSMark de Wever # error "__cpp_lib_erase_if should have the value 202002L in c++26" 44700c97cbcSMark de Wever # endif 44800c97cbcSMark de Wever 44900c97cbcSMark de Wever # ifndef __cpp_lib_nonmember_container_access 45000c97cbcSMark de Wever # error "__cpp_lib_nonmember_container_access should be defined in c++26" 45100c97cbcSMark de Wever # endif 45200c97cbcSMark de Wever # if __cpp_lib_nonmember_container_access != 201411L 45300c97cbcSMark de Wever # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26" 45400c97cbcSMark de Wever # endif 45500c97cbcSMark de Wever 45600c97cbcSMark de Wever # ifndef __cpp_lib_starts_ends_with 45700c97cbcSMark de Wever # error "__cpp_lib_starts_ends_with should be defined in c++26" 45800c97cbcSMark de Wever # endif 45900c97cbcSMark de Wever # if __cpp_lib_starts_ends_with != 201711L 46000c97cbcSMark de Wever # error "__cpp_lib_starts_ends_with should have the value 201711L in c++26" 46100c97cbcSMark de Wever # endif 46200c97cbcSMark de Wever 46300c97cbcSMark de Wever # ifndef __cpp_lib_string_contains 46400c97cbcSMark de Wever # error "__cpp_lib_string_contains should be defined in c++26" 46500c97cbcSMark de Wever # endif 46600c97cbcSMark de Wever # if __cpp_lib_string_contains != 202011L 46700c97cbcSMark de Wever # error "__cpp_lib_string_contains should have the value 202011L in c++26" 46800c97cbcSMark de Wever # endif 46900c97cbcSMark de Wever 47000c97cbcSMark de Wever # ifndef __cpp_lib_string_resize_and_overwrite 47100c97cbcSMark de Wever # error "__cpp_lib_string_resize_and_overwrite should be defined in c++26" 47200c97cbcSMark de Wever # endif 47300c97cbcSMark de Wever # if __cpp_lib_string_resize_and_overwrite != 202110L 47400c97cbcSMark de Wever # error "__cpp_lib_string_resize_and_overwrite should have the value 202110L in c++26" 47500c97cbcSMark de Wever # endif 47600c97cbcSMark de Wever 47700c97cbcSMark de Wever # ifndef __cpp_lib_string_udls 47800c97cbcSMark de Wever # error "__cpp_lib_string_udls should be defined in c++26" 47900c97cbcSMark de Wever # endif 48000c97cbcSMark de Wever # if __cpp_lib_string_udls != 201304L 48100c97cbcSMark de Wever # error "__cpp_lib_string_udls should have the value 201304L in c++26" 48200c97cbcSMark de Wever # endif 48300c97cbcSMark de Wever 48400c97cbcSMark de Wever # ifndef __cpp_lib_string_view 48500c97cbcSMark de Wever # error "__cpp_lib_string_view should be defined in c++26" 48600c97cbcSMark de Wever # endif 487*4a19be5dSHristo Hristov # if __cpp_lib_string_view != 202403L 488*4a19be5dSHristo Hristov # error "__cpp_lib_string_view should have the value 202403L in c++26" 48900c97cbcSMark de Wever # endif 49000c97cbcSMark de Wever 4913f05d044SMark de Wever # if !defined(_LIBCPP_VERSION) 4923f05d044SMark de Wever # ifndef __cpp_lib_to_string 4933f05d044SMark de Wever # error "__cpp_lib_to_string should be defined in c++26" 4943f05d044SMark de Wever # endif 4953f05d044SMark de Wever # if __cpp_lib_to_string != 202306L 4963f05d044SMark de Wever # error "__cpp_lib_to_string should have the value 202306L in c++26" 4973f05d044SMark de Wever # endif 4983f05d044SMark de Wever # else // _LIBCPP_VERSION 4993f05d044SMark de Wever # ifdef __cpp_lib_to_string 5003f05d044SMark de Wever # error "__cpp_lib_to_string should not be defined because it is unimplemented in libc++!" 5013f05d044SMark de Wever # endif 5023f05d044SMark de Wever # endif 5033f05d044SMark de Wever 50400c97cbcSMark de Wever #endif // TEST_STD_VER > 23 5052c6217f2SLouis Dionne 506