unordered_map.version.pass.cpp (5875B)
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 // <unordered_map> 14 15 // Test the feature test macros defined by <unordered_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_unordered_lookup 201811L [C++2a] 21 __cpp_lib_node_extract 201606L [C++17] 22 __cpp_lib_nonmember_container_access 201411L [C++17] 23 __cpp_lib_unordered_map_try_emplace 201411L [C++17] 24 */ 25 26 #include <unordered_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_unordered_lookup 40 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++2a" 41 # endif 42 43 # ifdef __cpp_lib_node_extract 44 # error "__cpp_lib_node_extract should not be defined before c++17" 45 # endif 46 47 # ifdef __cpp_lib_nonmember_container_access 48 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 49 # endif 50 51 # ifdef __cpp_lib_unordered_map_try_emplace 52 # error "__cpp_lib_unordered_map_try_emplace 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 # ifdef __cpp_lib_generic_unordered_lookup 66 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++2a" 67 # endif 68 69 # ifdef __cpp_lib_node_extract 70 # error "__cpp_lib_node_extract should not be defined before c++17" 71 # endif 72 73 # ifdef __cpp_lib_nonmember_container_access 74 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 75 # endif 76 77 # ifdef __cpp_lib_unordered_map_try_emplace 78 # error "__cpp_lib_unordered_map_try_emplace should not be defined before c++17" 79 # endif 80 81 #elif TEST_STD_VER == 17 82 83 # ifndef __cpp_lib_allocator_traits_is_always_equal 84 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 85 # endif 86 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 87 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 88 # endif 89 90 # ifdef __cpp_lib_erase_if 91 # error "__cpp_lib_erase_if should not be defined before c++2a" 92 # endif 93 94 # ifdef __cpp_lib_generic_unordered_lookup 95 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++2a" 96 # endif 97 98 # ifndef __cpp_lib_node_extract 99 # error "__cpp_lib_node_extract should be defined in c++17" 100 # endif 101 # if __cpp_lib_node_extract != 201606L 102 # error "__cpp_lib_node_extract should have the value 201606L in c++17" 103 # endif 104 105 # ifndef __cpp_lib_nonmember_container_access 106 # error "__cpp_lib_nonmember_container_access should be defined in c++17" 107 # endif 108 # if __cpp_lib_nonmember_container_access != 201411L 109 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 110 # endif 111 112 # ifndef __cpp_lib_unordered_map_try_emplace 113 # error "__cpp_lib_unordered_map_try_emplace should be defined in c++17" 114 # endif 115 # if __cpp_lib_unordered_map_try_emplace != 201411L 116 # error "__cpp_lib_unordered_map_try_emplace should have the value 201411L in c++17" 117 # endif 118 119 #elif TEST_STD_VER > 17 120 121 # ifndef __cpp_lib_allocator_traits_is_always_equal 122 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2a" 123 # endif 124 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 125 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2a" 126 # endif 127 128 # ifndef __cpp_lib_erase_if 129 # error "__cpp_lib_erase_if should be defined in c++2a" 130 # endif 131 # if __cpp_lib_erase_if != 201811L 132 # error "__cpp_lib_erase_if should have the value 201811L in c++2a" 133 # endif 134 135 # if !defined(_LIBCPP_VERSION) 136 # ifndef __cpp_lib_generic_unordered_lookup 137 # error "__cpp_lib_generic_unordered_lookup should be defined in c++2a" 138 # endif 139 # if __cpp_lib_generic_unordered_lookup != 201811L 140 # error "__cpp_lib_generic_unordered_lookup should have the value 201811L in c++2a" 141 # endif 142 # else // _LIBCPP_VERSION 143 # ifdef __cpp_lib_generic_unordered_lookup 144 # error "__cpp_lib_generic_unordered_lookup should not be defined because it is unimplemented in libc++!" 145 # endif 146 # endif 147 148 # ifndef __cpp_lib_node_extract 149 # error "__cpp_lib_node_extract should be defined in c++2a" 150 # endif 151 # if __cpp_lib_node_extract != 201606L 152 # error "__cpp_lib_node_extract should have the value 201606L in c++2a" 153 # endif 154 155 # ifndef __cpp_lib_nonmember_container_access 156 # error "__cpp_lib_nonmember_container_access should be defined in c++2a" 157 # endif 158 # if __cpp_lib_nonmember_container_access != 201411L 159 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2a" 160 # endif 161 162 # ifndef __cpp_lib_unordered_map_try_emplace 163 # error "__cpp_lib_unordered_map_try_emplace should be defined in c++2a" 164 # endif 165 # if __cpp_lib_unordered_map_try_emplace != 201411L 166 # error "__cpp_lib_unordered_map_try_emplace should have the value 201411L in c++2a" 167 # endif 168 169 #endif // TEST_STD_VER > 17 170 171 int main() {}