map.version.pass.cpp (5787B)
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 // <map> 14 15 // Test the feature test macros defined by <map> 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_map_try_emplace 201411L [C++17] 22 __cpp_lib_node_extract 201606L [C++17] 23 __cpp_lib_nonmember_container_access 201411L [C++17] 24 */ 25 26 #include <map> 27 #include "test_macros.h" 28 29 #if TEST_STD_VER < 14 30 31 # ifdef __cpp_lib_allocator_traits_is_always_equal 32 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 33 # endif 34 35 # ifdef __cpp_lib_erase_if 36 # error "__cpp_lib_erase_if should not be defined before c++2a" 37 # endif 38 39 # ifdef __cpp_lib_generic_associative_lookup 40 # error "__cpp_lib_generic_associative_lookup should not be defined before c++14" 41 # endif 42 43 # ifdef __cpp_lib_map_try_emplace 44 # error "__cpp_lib_map_try_emplace should not be defined before c++17" 45 # endif 46 47 # ifdef __cpp_lib_node_extract 48 # error "__cpp_lib_node_extract should not be defined before c++17" 49 # endif 50 51 # ifdef __cpp_lib_nonmember_container_access 52 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 53 # endif 54 55 #elif TEST_STD_VER == 14 56 57 # ifdef __cpp_lib_allocator_traits_is_always_equal 58 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 59 # endif 60 61 # ifdef __cpp_lib_erase_if 62 # error "__cpp_lib_erase_if should not be defined before c++2a" 63 # endif 64 65 # ifndef __cpp_lib_generic_associative_lookup 66 # error "__cpp_lib_generic_associative_lookup should be defined in c++14" 67 # endif 68 # if __cpp_lib_generic_associative_lookup != 201304L 69 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++14" 70 # endif 71 72 # ifdef __cpp_lib_map_try_emplace 73 # error "__cpp_lib_map_try_emplace should not be defined before c++17" 74 # endif 75 76 # ifdef __cpp_lib_node_extract 77 # error "__cpp_lib_node_extract should not be defined before c++17" 78 # endif 79 80 # ifdef __cpp_lib_nonmember_container_access 81 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 82 # endif 83 84 #elif TEST_STD_VER == 17 85 86 # ifndef __cpp_lib_allocator_traits_is_always_equal 87 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 88 # endif 89 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 90 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 91 # endif 92 93 # ifdef __cpp_lib_erase_if 94 # error "__cpp_lib_erase_if should not be defined before c++2a" 95 # endif 96 97 # ifndef __cpp_lib_generic_associative_lookup 98 # error "__cpp_lib_generic_associative_lookup should be defined in c++17" 99 # endif 100 # if __cpp_lib_generic_associative_lookup != 201304L 101 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++17" 102 # endif 103 104 # ifndef __cpp_lib_map_try_emplace 105 # error "__cpp_lib_map_try_emplace should be defined in c++17" 106 # endif 107 # if __cpp_lib_map_try_emplace != 201411L 108 # error "__cpp_lib_map_try_emplace should have the value 201411L in c++17" 109 # endif 110 111 # ifndef __cpp_lib_node_extract 112 # error "__cpp_lib_node_extract should be defined in c++17" 113 # endif 114 # if __cpp_lib_node_extract != 201606L 115 # error "__cpp_lib_node_extract should have the value 201606L in c++17" 116 # endif 117 118 # ifndef __cpp_lib_nonmember_container_access 119 # error "__cpp_lib_nonmember_container_access should be defined in c++17" 120 # endif 121 # if __cpp_lib_nonmember_container_access != 201411L 122 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 123 # endif 124 125 #elif TEST_STD_VER > 17 126 127 # ifndef __cpp_lib_allocator_traits_is_always_equal 128 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2a" 129 # endif 130 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 131 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2a" 132 # endif 133 134 # ifndef __cpp_lib_erase_if 135 # error "__cpp_lib_erase_if should be defined in c++2a" 136 # endif 137 # if __cpp_lib_erase_if != 201811L 138 # error "__cpp_lib_erase_if should have the value 201811L in c++2a" 139 # endif 140 141 # ifndef __cpp_lib_generic_associative_lookup 142 # error "__cpp_lib_generic_associative_lookup should be defined in c++2a" 143 # endif 144 # if __cpp_lib_generic_associative_lookup != 201304L 145 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++2a" 146 # endif 147 148 # ifndef __cpp_lib_map_try_emplace 149 # error "__cpp_lib_map_try_emplace should be defined in c++2a" 150 # endif 151 # if __cpp_lib_map_try_emplace != 201411L 152 # error "__cpp_lib_map_try_emplace should have the value 201411L in c++2a" 153 # endif 154 155 # ifndef __cpp_lib_node_extract 156 # error "__cpp_lib_node_extract should be defined in c++2a" 157 # endif 158 # if __cpp_lib_node_extract != 201606L 159 # error "__cpp_lib_node_extract should have the value 201606L in c++2a" 160 # endif 161 162 # ifndef __cpp_lib_nonmember_container_access 163 # error "__cpp_lib_nonmember_container_access should be defined in c++2a" 164 # endif 165 # if __cpp_lib_nonmember_container_access != 201411L 166 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2a" 167 # endif 168 169 #endif // TEST_STD_VER > 17 170 171 int main() {}