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 // <set> 152c6217f2SLouis Dionne 162c6217f2SLouis Dionne // Test the feature test macros defined by <set> 172c6217f2SLouis Dionne 182c6217f2SLouis Dionne /* Constant Value 192c6217f2SLouis Dionne __cpp_lib_allocator_traits_is_always_equal 201411L [C++17] 2071400505SMark de Wever __cpp_lib_associative_heterogeneous_erasure 202110L [C++23] 213f05d044SMark de Wever __cpp_lib_associative_heterogeneous_insertion 202306L [C++26] 22*028f1b07Skrzysdz __cpp_lib_containers_ranges 202202L [C++23] 232c6217f2SLouis Dionne __cpp_lib_erase_if 202002L [C++20] 242c6217f2SLouis Dionne __cpp_lib_generic_associative_lookup 201304L [C++14] 252c6217f2SLouis Dionne __cpp_lib_node_extract 201606L [C++17] 262c6217f2SLouis Dionne __cpp_lib_nonmember_container_access 201411L [C++17] 272c6217f2SLouis Dionne */ 282c6217f2SLouis Dionne 292c6217f2SLouis Dionne #include <set> 302c6217f2SLouis Dionne #include "test_macros.h" 312c6217f2SLouis Dionne 322c6217f2SLouis Dionne #if TEST_STD_VER < 14 332c6217f2SLouis Dionne 342c6217f2SLouis Dionne # ifdef __cpp_lib_allocator_traits_is_always_equal 352c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 362c6217f2SLouis Dionne # endif 372c6217f2SLouis Dionne 382c6217f2SLouis Dionne # ifdef __cpp_lib_associative_heterogeneous_erasure 3971400505SMark de Wever # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23" 402c6217f2SLouis Dionne # endif 412c6217f2SLouis Dionne 423f05d044SMark de Wever # ifdef __cpp_lib_associative_heterogeneous_insertion 433f05d044SMark de Wever # error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26" 443f05d044SMark de Wever # endif 453f05d044SMark de Wever 46*028f1b07Skrzysdz # ifdef __cpp_lib_containers_ranges 47*028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should not be defined before c++23" 48*028f1b07Skrzysdz # endif 49*028f1b07Skrzysdz 502c6217f2SLouis Dionne # ifdef __cpp_lib_erase_if 512c6217f2SLouis Dionne # error "__cpp_lib_erase_if should not be defined before c++20" 522c6217f2SLouis Dionne # endif 532c6217f2SLouis Dionne 542c6217f2SLouis Dionne # ifdef __cpp_lib_generic_associative_lookup 552c6217f2SLouis Dionne # error "__cpp_lib_generic_associative_lookup should not be defined before c++14" 562c6217f2SLouis Dionne # endif 572c6217f2SLouis Dionne 582c6217f2SLouis Dionne # ifdef __cpp_lib_node_extract 592c6217f2SLouis Dionne # error "__cpp_lib_node_extract should not be defined before c++17" 602c6217f2SLouis Dionne # endif 612c6217f2SLouis Dionne 622c6217f2SLouis Dionne # ifdef __cpp_lib_nonmember_container_access 632c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 642c6217f2SLouis Dionne # endif 652c6217f2SLouis Dionne 662c6217f2SLouis Dionne #elif TEST_STD_VER == 14 672c6217f2SLouis Dionne 682c6217f2SLouis Dionne # ifdef __cpp_lib_allocator_traits_is_always_equal 692c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 702c6217f2SLouis Dionne # endif 712c6217f2SLouis Dionne 722c6217f2SLouis Dionne # ifdef __cpp_lib_associative_heterogeneous_erasure 7371400505SMark de Wever # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23" 742c6217f2SLouis Dionne # endif 752c6217f2SLouis Dionne 763f05d044SMark de Wever # ifdef __cpp_lib_associative_heterogeneous_insertion 773f05d044SMark de Wever # error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26" 783f05d044SMark de Wever # endif 793f05d044SMark de Wever 80*028f1b07Skrzysdz # ifdef __cpp_lib_containers_ranges 81*028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should not be defined before c++23" 82*028f1b07Skrzysdz # endif 83*028f1b07Skrzysdz 842c6217f2SLouis Dionne # ifdef __cpp_lib_erase_if 852c6217f2SLouis Dionne # error "__cpp_lib_erase_if should not be defined before c++20" 862c6217f2SLouis Dionne # endif 872c6217f2SLouis Dionne 882c6217f2SLouis Dionne # ifndef __cpp_lib_generic_associative_lookup 892c6217f2SLouis Dionne # error "__cpp_lib_generic_associative_lookup should be defined in c++14" 902c6217f2SLouis Dionne # endif 912c6217f2SLouis Dionne # if __cpp_lib_generic_associative_lookup != 201304L 922c6217f2SLouis Dionne # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++14" 932c6217f2SLouis Dionne # endif 942c6217f2SLouis Dionne 952c6217f2SLouis Dionne # ifdef __cpp_lib_node_extract 962c6217f2SLouis Dionne # error "__cpp_lib_node_extract should not be defined before c++17" 972c6217f2SLouis Dionne # endif 982c6217f2SLouis Dionne 992c6217f2SLouis Dionne # ifdef __cpp_lib_nonmember_container_access 1002c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 1012c6217f2SLouis Dionne # endif 1022c6217f2SLouis Dionne 1032c6217f2SLouis Dionne #elif TEST_STD_VER == 17 1042c6217f2SLouis Dionne 1052c6217f2SLouis Dionne # ifndef __cpp_lib_allocator_traits_is_always_equal 1062c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 1072c6217f2SLouis Dionne # endif 1082c6217f2SLouis Dionne # if __cpp_lib_allocator_traits_is_always_equal != 201411L 1092c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 1102c6217f2SLouis Dionne # endif 1112c6217f2SLouis Dionne 1122c6217f2SLouis Dionne # ifdef __cpp_lib_associative_heterogeneous_erasure 11371400505SMark de Wever # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23" 1142c6217f2SLouis Dionne # endif 1152c6217f2SLouis Dionne 1163f05d044SMark de Wever # ifdef __cpp_lib_associative_heterogeneous_insertion 1173f05d044SMark de Wever # error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26" 1183f05d044SMark de Wever # endif 1193f05d044SMark de Wever 120*028f1b07Skrzysdz # ifdef __cpp_lib_containers_ranges 121*028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should not be defined before c++23" 122*028f1b07Skrzysdz # endif 123*028f1b07Skrzysdz 1242c6217f2SLouis Dionne # ifdef __cpp_lib_erase_if 1252c6217f2SLouis Dionne # error "__cpp_lib_erase_if should not be defined before c++20" 1262c6217f2SLouis Dionne # endif 1272c6217f2SLouis Dionne 1282c6217f2SLouis Dionne # ifndef __cpp_lib_generic_associative_lookup 1292c6217f2SLouis Dionne # error "__cpp_lib_generic_associative_lookup should be defined in c++17" 1302c6217f2SLouis Dionne # endif 1312c6217f2SLouis Dionne # if __cpp_lib_generic_associative_lookup != 201304L 1322c6217f2SLouis Dionne # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++17" 1332c6217f2SLouis Dionne # endif 1342c6217f2SLouis Dionne 1352c6217f2SLouis Dionne # ifndef __cpp_lib_node_extract 1362c6217f2SLouis Dionne # error "__cpp_lib_node_extract should be defined in c++17" 1372c6217f2SLouis Dionne # endif 1382c6217f2SLouis Dionne # if __cpp_lib_node_extract != 201606L 1392c6217f2SLouis Dionne # error "__cpp_lib_node_extract should have the value 201606L in c++17" 1402c6217f2SLouis Dionne # endif 1412c6217f2SLouis Dionne 1422c6217f2SLouis Dionne # ifndef __cpp_lib_nonmember_container_access 1432c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should be defined in c++17" 1442c6217f2SLouis Dionne # endif 1452c6217f2SLouis Dionne # if __cpp_lib_nonmember_container_access != 201411L 1462c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 1472c6217f2SLouis Dionne # endif 1482c6217f2SLouis Dionne 1492c6217f2SLouis Dionne #elif TEST_STD_VER == 20 1502c6217f2SLouis Dionne 1512c6217f2SLouis Dionne # ifndef __cpp_lib_allocator_traits_is_always_equal 1522c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20" 1532c6217f2SLouis Dionne # endif 1542c6217f2SLouis Dionne # if __cpp_lib_allocator_traits_is_always_equal != 201411L 1552c6217f2SLouis Dionne # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20" 1562c6217f2SLouis Dionne # endif 1572c6217f2SLouis Dionne 1582c6217f2SLouis Dionne # ifdef __cpp_lib_associative_heterogeneous_erasure 15971400505SMark de Wever # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23" 1602c6217f2SLouis Dionne # endif 1612c6217f2SLouis Dionne 1623f05d044SMark de Wever # ifdef __cpp_lib_associative_heterogeneous_insertion 1633f05d044SMark de Wever # error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26" 1643f05d044SMark de Wever # endif 1653f05d044SMark de Wever 166*028f1b07Skrzysdz # ifdef __cpp_lib_containers_ranges 167*028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should not be defined before c++23" 168*028f1b07Skrzysdz # endif 169*028f1b07Skrzysdz 1702c6217f2SLouis Dionne # ifndef __cpp_lib_erase_if 1712c6217f2SLouis Dionne # error "__cpp_lib_erase_if should be defined in c++20" 1722c6217f2SLouis Dionne # endif 1732c6217f2SLouis Dionne # if __cpp_lib_erase_if != 202002L 1742c6217f2SLouis Dionne # error "__cpp_lib_erase_if should have the value 202002L in c++20" 1752c6217f2SLouis Dionne # endif 1762c6217f2SLouis Dionne 1772c6217f2SLouis Dionne # ifndef __cpp_lib_generic_associative_lookup 1782c6217f2SLouis Dionne # error "__cpp_lib_generic_associative_lookup should be defined in c++20" 1792c6217f2SLouis Dionne # endif 1802c6217f2SLouis Dionne # if __cpp_lib_generic_associative_lookup != 201304L 1812c6217f2SLouis Dionne # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++20" 1822c6217f2SLouis Dionne # endif 1832c6217f2SLouis Dionne 1842c6217f2SLouis Dionne # ifndef __cpp_lib_node_extract 1852c6217f2SLouis Dionne # error "__cpp_lib_node_extract should be defined in c++20" 1862c6217f2SLouis Dionne # endif 1872c6217f2SLouis Dionne # if __cpp_lib_node_extract != 201606L 1882c6217f2SLouis Dionne # error "__cpp_lib_node_extract should have the value 201606L in c++20" 1892c6217f2SLouis Dionne # endif 1902c6217f2SLouis Dionne 1912c6217f2SLouis Dionne # ifndef __cpp_lib_nonmember_container_access 1922c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should be defined in c++20" 1932c6217f2SLouis Dionne # endif 1942c6217f2SLouis Dionne # if __cpp_lib_nonmember_container_access != 201411L 1952c6217f2SLouis Dionne # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" 1962c6217f2SLouis Dionne # endif 1972c6217f2SLouis Dionne 19800c97cbcSMark de Wever #elif TEST_STD_VER == 23 1992c6217f2SLouis Dionne 2002c6217f2SLouis Dionne # ifndef __cpp_lib_allocator_traits_is_always_equal 20171400505SMark de Wever # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23" 2022c6217f2SLouis Dionne # endif 2032c6217f2SLouis Dionne # if __cpp_lib_allocator_traits_is_always_equal != 201411L 20471400505SMark de Wever # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++23" 2052c6217f2SLouis Dionne # endif 2062c6217f2SLouis Dionne 2072c6217f2SLouis Dionne # if !defined(_LIBCPP_VERSION) 2082c6217f2SLouis Dionne # ifndef __cpp_lib_associative_heterogeneous_erasure 20971400505SMark de Wever # error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++23" 2102c6217f2SLouis Dionne # endif 2112c6217f2SLouis Dionne # if __cpp_lib_associative_heterogeneous_erasure != 202110L 21271400505SMark de Wever # error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++23" 2132c6217f2SLouis Dionne # endif 2142c6217f2SLouis Dionne # else // _LIBCPP_VERSION 2152c6217f2SLouis Dionne # ifdef __cpp_lib_associative_heterogeneous_erasure 2162c6217f2SLouis Dionne # error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!" 2172c6217f2SLouis Dionne # endif 2182c6217f2SLouis Dionne # endif 2192c6217f2SLouis Dionne 2203f05d044SMark de Wever # ifdef __cpp_lib_associative_heterogeneous_insertion 2213f05d044SMark de Wever # error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26" 2223f05d044SMark de Wever # endif 2233f05d044SMark de Wever 224*028f1b07Skrzysdz # ifndef __cpp_lib_containers_ranges 225*028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should be defined in c++23" 226*028f1b07Skrzysdz # endif 227*028f1b07Skrzysdz # if __cpp_lib_containers_ranges != 202202L 228*028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should have the value 202202L in c++23" 229*028f1b07Skrzysdz # endif 230*028f1b07Skrzysdz 2312c6217f2SLouis Dionne # ifndef __cpp_lib_erase_if 23271400505SMark de Wever # error "__cpp_lib_erase_if should be defined in c++23" 2332c6217f2SLouis Dionne # endif 2342c6217f2SLouis Dionne # if __cpp_lib_erase_if != 202002L 23571400505SMark de Wever # error "__cpp_lib_erase_if should have the value 202002L in c++23" 2362c6217f2SLouis Dionne # endif 2372c6217f2SLouis Dionne 2382c6217f2SLouis Dionne # ifndef __cpp_lib_generic_associative_lookup 23971400505SMark de Wever # error "__cpp_lib_generic_associative_lookup should be defined in c++23" 2402c6217f2SLouis Dionne # endif 2412c6217f2SLouis Dionne # if __cpp_lib_generic_associative_lookup != 201304L 24271400505SMark de Wever # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++23" 2432c6217f2SLouis Dionne # endif 2442c6217f2SLouis Dionne 2452c6217f2SLouis Dionne # ifndef __cpp_lib_node_extract 24671400505SMark de Wever # error "__cpp_lib_node_extract should be defined in c++23" 2472c6217f2SLouis Dionne # endif 2482c6217f2SLouis Dionne # if __cpp_lib_node_extract != 201606L 24971400505SMark de Wever # error "__cpp_lib_node_extract should have the value 201606L in c++23" 2502c6217f2SLouis Dionne # endif 2512c6217f2SLouis Dionne 2522c6217f2SLouis Dionne # ifndef __cpp_lib_nonmember_container_access 25371400505SMark de Wever # error "__cpp_lib_nonmember_container_access should be defined in c++23" 2542c6217f2SLouis Dionne # endif 2552c6217f2SLouis Dionne # if __cpp_lib_nonmember_container_access != 201411L 25671400505SMark de Wever # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23" 2572c6217f2SLouis Dionne # endif 2582c6217f2SLouis Dionne 25900c97cbcSMark de Wever #elif TEST_STD_VER > 23 26000c97cbcSMark de Wever 26100c97cbcSMark de Wever # ifndef __cpp_lib_allocator_traits_is_always_equal 26200c97cbcSMark de Wever # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26" 26300c97cbcSMark de Wever # endif 26400c97cbcSMark de Wever # if __cpp_lib_allocator_traits_is_always_equal != 201411L 26500c97cbcSMark de Wever # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26" 26600c97cbcSMark de Wever # endif 26700c97cbcSMark de Wever 26800c97cbcSMark de Wever # if !defined(_LIBCPP_VERSION) 26900c97cbcSMark de Wever # ifndef __cpp_lib_associative_heterogeneous_erasure 27000c97cbcSMark de Wever # error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++26" 27100c97cbcSMark de Wever # endif 27200c97cbcSMark de Wever # if __cpp_lib_associative_heterogeneous_erasure != 202110L 27300c97cbcSMark de Wever # error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++26" 27400c97cbcSMark de Wever # endif 27500c97cbcSMark de Wever # else // _LIBCPP_VERSION 27600c97cbcSMark de Wever # ifdef __cpp_lib_associative_heterogeneous_erasure 27700c97cbcSMark de Wever # error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!" 27800c97cbcSMark de Wever # endif 27900c97cbcSMark de Wever # endif 28000c97cbcSMark de Wever 2813f05d044SMark de Wever # if !defined(_LIBCPP_VERSION) 2823f05d044SMark de Wever # ifndef __cpp_lib_associative_heterogeneous_insertion 2833f05d044SMark de Wever # error "__cpp_lib_associative_heterogeneous_insertion should be defined in c++26" 2843f05d044SMark de Wever # endif 2853f05d044SMark de Wever # if __cpp_lib_associative_heterogeneous_insertion != 202306L 2863f05d044SMark de Wever # error "__cpp_lib_associative_heterogeneous_insertion should have the value 202306L in c++26" 2873f05d044SMark de Wever # endif 2883f05d044SMark de Wever # else // _LIBCPP_VERSION 2893f05d044SMark de Wever # ifdef __cpp_lib_associative_heterogeneous_insertion 2903f05d044SMark de Wever # error "__cpp_lib_associative_heterogeneous_insertion should not be defined because it is unimplemented in libc++!" 2913f05d044SMark de Wever # endif 2923f05d044SMark de Wever # endif 2933f05d044SMark de Wever 294*028f1b07Skrzysdz # ifndef __cpp_lib_containers_ranges 295*028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should be defined in c++26" 296*028f1b07Skrzysdz # endif 297*028f1b07Skrzysdz # if __cpp_lib_containers_ranges != 202202L 298*028f1b07Skrzysdz # error "__cpp_lib_containers_ranges should have the value 202202L in c++26" 299*028f1b07Skrzysdz # endif 300*028f1b07Skrzysdz 30100c97cbcSMark de Wever # ifndef __cpp_lib_erase_if 30200c97cbcSMark de Wever # error "__cpp_lib_erase_if should be defined in c++26" 30300c97cbcSMark de Wever # endif 30400c97cbcSMark de Wever # if __cpp_lib_erase_if != 202002L 30500c97cbcSMark de Wever # error "__cpp_lib_erase_if should have the value 202002L in c++26" 30600c97cbcSMark de Wever # endif 30700c97cbcSMark de Wever 30800c97cbcSMark de Wever # ifndef __cpp_lib_generic_associative_lookup 30900c97cbcSMark de Wever # error "__cpp_lib_generic_associative_lookup should be defined in c++26" 31000c97cbcSMark de Wever # endif 31100c97cbcSMark de Wever # if __cpp_lib_generic_associative_lookup != 201304L 31200c97cbcSMark de Wever # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++26" 31300c97cbcSMark de Wever # endif 31400c97cbcSMark de Wever 31500c97cbcSMark de Wever # ifndef __cpp_lib_node_extract 31600c97cbcSMark de Wever # error "__cpp_lib_node_extract should be defined in c++26" 31700c97cbcSMark de Wever # endif 31800c97cbcSMark de Wever # if __cpp_lib_node_extract != 201606L 31900c97cbcSMark de Wever # error "__cpp_lib_node_extract should have the value 201606L in c++26" 32000c97cbcSMark de Wever # endif 32100c97cbcSMark de Wever 32200c97cbcSMark de Wever # ifndef __cpp_lib_nonmember_container_access 32300c97cbcSMark de Wever # error "__cpp_lib_nonmember_container_access should be defined in c++26" 32400c97cbcSMark de Wever # endif 32500c97cbcSMark de Wever # if __cpp_lib_nonmember_container_access != 201411L 32600c97cbcSMark de Wever # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26" 32700c97cbcSMark de Wever # endif 32800c97cbcSMark de Wever 32900c97cbcSMark de Wever #endif // TEST_STD_VER > 23 3302c6217f2SLouis Dionne 331