set.version.pass.cpp (5017B)
1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // WARNING: This test was generated by generate_feature_test_macro_components.py 11 // and should not be edited manually. 12 13 // <set> 14 15 // Test the feature test macros defined by <set> 16 17 /* Constant Value 18 __cpp_lib_allocator_traits_is_always_equal 201411L [C++17] 19 __cpp_lib_erase_if 201811L [C++2a] 20 __cpp_lib_generic_associative_lookup 201304L [C++14] 21 __cpp_lib_node_extract 201606L [C++17] 22 __cpp_lib_nonmember_container_access 201411L [C++17] 23 */ 24 25 #include <set> 26 #include "test_macros.h" 27 28 #if TEST_STD_VER < 14 29 30 # ifdef __cpp_lib_allocator_traits_is_always_equal 31 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 32 # endif 33 34 # ifdef __cpp_lib_erase_if 35 # error "__cpp_lib_erase_if should not be defined before c++2a" 36 # endif 37 38 # ifdef __cpp_lib_generic_associative_lookup 39 # error "__cpp_lib_generic_associative_lookup should not be defined before c++14" 40 # endif 41 42 # ifdef __cpp_lib_node_extract 43 # error "__cpp_lib_node_extract should not be defined before c++17" 44 # endif 45 46 # ifdef __cpp_lib_nonmember_container_access 47 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 48 # endif 49 50 #elif TEST_STD_VER == 14 51 52 # ifdef __cpp_lib_allocator_traits_is_always_equal 53 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 54 # endif 55 56 # ifdef __cpp_lib_erase_if 57 # error "__cpp_lib_erase_if should not be defined before c++2a" 58 # endif 59 60 # ifndef __cpp_lib_generic_associative_lookup 61 # error "__cpp_lib_generic_associative_lookup should be defined in c++14" 62 # endif 63 # if __cpp_lib_generic_associative_lookup != 201304L 64 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++14" 65 # endif 66 67 # ifdef __cpp_lib_node_extract 68 # error "__cpp_lib_node_extract should not be defined before c++17" 69 # endif 70 71 # ifdef __cpp_lib_nonmember_container_access 72 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 73 # endif 74 75 #elif TEST_STD_VER == 17 76 77 # ifndef __cpp_lib_allocator_traits_is_always_equal 78 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 79 # endif 80 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 81 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 82 # endif 83 84 # ifdef __cpp_lib_erase_if 85 # error "__cpp_lib_erase_if should not be defined before c++2a" 86 # endif 87 88 # ifndef __cpp_lib_generic_associative_lookup 89 # error "__cpp_lib_generic_associative_lookup should be defined in c++17" 90 # endif 91 # if __cpp_lib_generic_associative_lookup != 201304L 92 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++17" 93 # endif 94 95 # ifndef __cpp_lib_node_extract 96 # error "__cpp_lib_node_extract should be defined in c++17" 97 # endif 98 # if __cpp_lib_node_extract != 201606L 99 # error "__cpp_lib_node_extract should have the value 201606L in c++17" 100 # endif 101 102 # ifndef __cpp_lib_nonmember_container_access 103 # error "__cpp_lib_nonmember_container_access should be defined in c++17" 104 # endif 105 # if __cpp_lib_nonmember_container_access != 201411L 106 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 107 # endif 108 109 #elif TEST_STD_VER > 17 110 111 # ifndef __cpp_lib_allocator_traits_is_always_equal 112 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2a" 113 # endif 114 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 115 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2a" 116 # endif 117 118 # ifndef __cpp_lib_erase_if 119 # error "__cpp_lib_erase_if should be defined in c++2a" 120 # endif 121 # if __cpp_lib_erase_if != 201811L 122 # error "__cpp_lib_erase_if should have the value 201811L in c++2a" 123 # endif 124 125 # ifndef __cpp_lib_generic_associative_lookup 126 # error "__cpp_lib_generic_associative_lookup should be defined in c++2a" 127 # endif 128 # if __cpp_lib_generic_associative_lookup != 201304L 129 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++2a" 130 # endif 131 132 # ifndef __cpp_lib_node_extract 133 # error "__cpp_lib_node_extract should be defined in c++2a" 134 # endif 135 # if __cpp_lib_node_extract != 201606L 136 # error "__cpp_lib_node_extract should have the value 201606L in c++2a" 137 # endif 138 139 # ifndef __cpp_lib_nonmember_container_access 140 # error "__cpp_lib_nonmember_container_access should be defined in c++2a" 141 # endif 142 # if __cpp_lib_nonmember_container_access != 201411L 143 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2a" 144 # endif 145 146 #endif // TEST_STD_VER > 17 147 148 int main() {}