1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 // 9 // WARNING: This test was generated by generate_feature_test_macro_components.py 10 // and should not be edited manually. 11 // 12 // clang-format off 13 14 // <unordered_map> 15 16 // Test the feature test macros defined by <unordered_map> 17 18 /* Constant Value 19 __cpp_lib_allocator_traits_is_always_equal 201411L [C++17] 20 __cpp_lib_associative_heterogeneous_erasure 202110L [C++2b] 21 __cpp_lib_erase_if 202002L [C++20] 22 __cpp_lib_generic_unordered_lookup 201811L [C++20] 23 __cpp_lib_node_extract 201606L [C++17] 24 __cpp_lib_nonmember_container_access 201411L [C++17] 25 __cpp_lib_ranges_to_container 202202L [C++2b] 26 __cpp_lib_unordered_map_try_emplace 201411L [C++17] 27 */ 28 29 #include <unordered_map> 30 #include "test_macros.h" 31 32 #if TEST_STD_VER < 14 33 34 # ifdef __cpp_lib_allocator_traits_is_always_equal 35 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 36 # endif 37 38 # ifdef __cpp_lib_associative_heterogeneous_erasure 39 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 40 # endif 41 42 # ifdef __cpp_lib_erase_if 43 # error "__cpp_lib_erase_if should not be defined before c++20" 44 # endif 45 46 # ifdef __cpp_lib_generic_unordered_lookup 47 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++20" 48 # endif 49 50 # ifdef __cpp_lib_node_extract 51 # error "__cpp_lib_node_extract should not be defined before c++17" 52 # endif 53 54 # ifdef __cpp_lib_nonmember_container_access 55 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 56 # endif 57 58 # ifdef __cpp_lib_ranges_to_container 59 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 60 # endif 61 62 # ifdef __cpp_lib_unordered_map_try_emplace 63 # error "__cpp_lib_unordered_map_try_emplace should not be defined before c++17" 64 # endif 65 66 #elif TEST_STD_VER == 14 67 68 # ifdef __cpp_lib_allocator_traits_is_always_equal 69 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 70 # endif 71 72 # ifdef __cpp_lib_associative_heterogeneous_erasure 73 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 74 # endif 75 76 # ifdef __cpp_lib_erase_if 77 # error "__cpp_lib_erase_if should not be defined before c++20" 78 # endif 79 80 # ifdef __cpp_lib_generic_unordered_lookup 81 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++20" 82 # endif 83 84 # ifdef __cpp_lib_node_extract 85 # error "__cpp_lib_node_extract should not be defined before c++17" 86 # endif 87 88 # ifdef __cpp_lib_nonmember_container_access 89 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 90 # endif 91 92 # ifdef __cpp_lib_ranges_to_container 93 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 94 # endif 95 96 # ifdef __cpp_lib_unordered_map_try_emplace 97 # error "__cpp_lib_unordered_map_try_emplace should not be defined before c++17" 98 # endif 99 100 #elif TEST_STD_VER == 17 101 102 # ifndef __cpp_lib_allocator_traits_is_always_equal 103 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 104 # endif 105 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 106 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 107 # endif 108 109 # ifdef __cpp_lib_associative_heterogeneous_erasure 110 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 111 # endif 112 113 # ifdef __cpp_lib_erase_if 114 # error "__cpp_lib_erase_if should not be defined before c++20" 115 # endif 116 117 # ifdef __cpp_lib_generic_unordered_lookup 118 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++20" 119 # endif 120 121 # ifndef __cpp_lib_node_extract 122 # error "__cpp_lib_node_extract should be defined in c++17" 123 # endif 124 # if __cpp_lib_node_extract != 201606L 125 # error "__cpp_lib_node_extract should have the value 201606L in c++17" 126 # endif 127 128 # ifndef __cpp_lib_nonmember_container_access 129 # error "__cpp_lib_nonmember_container_access should be defined in c++17" 130 # endif 131 # if __cpp_lib_nonmember_container_access != 201411L 132 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 133 # endif 134 135 # ifdef __cpp_lib_ranges_to_container 136 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 137 # endif 138 139 # ifndef __cpp_lib_unordered_map_try_emplace 140 # error "__cpp_lib_unordered_map_try_emplace should be defined in c++17" 141 # endif 142 # if __cpp_lib_unordered_map_try_emplace != 201411L 143 # error "__cpp_lib_unordered_map_try_emplace should have the value 201411L in c++17" 144 # endif 145 146 #elif TEST_STD_VER == 20 147 148 # ifndef __cpp_lib_allocator_traits_is_always_equal 149 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20" 150 # endif 151 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 152 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20" 153 # endif 154 155 # ifdef __cpp_lib_associative_heterogeneous_erasure 156 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 157 # endif 158 159 # ifndef __cpp_lib_erase_if 160 # error "__cpp_lib_erase_if should be defined in c++20" 161 # endif 162 # if __cpp_lib_erase_if != 202002L 163 # error "__cpp_lib_erase_if should have the value 202002L in c++20" 164 # endif 165 166 # ifndef __cpp_lib_generic_unordered_lookup 167 # error "__cpp_lib_generic_unordered_lookup should be defined in c++20" 168 # endif 169 # if __cpp_lib_generic_unordered_lookup != 201811L 170 # error "__cpp_lib_generic_unordered_lookup should have the value 201811L in c++20" 171 # endif 172 173 # ifndef __cpp_lib_node_extract 174 # error "__cpp_lib_node_extract should be defined in c++20" 175 # endif 176 # if __cpp_lib_node_extract != 201606L 177 # error "__cpp_lib_node_extract should have the value 201606L in c++20" 178 # endif 179 180 # ifndef __cpp_lib_nonmember_container_access 181 # error "__cpp_lib_nonmember_container_access should be defined in c++20" 182 # endif 183 # if __cpp_lib_nonmember_container_access != 201411L 184 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" 185 # endif 186 187 # ifdef __cpp_lib_ranges_to_container 188 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 189 # endif 190 191 # ifndef __cpp_lib_unordered_map_try_emplace 192 # error "__cpp_lib_unordered_map_try_emplace should be defined in c++20" 193 # endif 194 # if __cpp_lib_unordered_map_try_emplace != 201411L 195 # error "__cpp_lib_unordered_map_try_emplace should have the value 201411L in c++20" 196 # endif 197 198 #elif TEST_STD_VER > 20 199 200 # ifndef __cpp_lib_allocator_traits_is_always_equal 201 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2b" 202 # endif 203 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 204 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b" 205 # endif 206 207 # if !defined(_LIBCPP_VERSION) 208 # ifndef __cpp_lib_associative_heterogeneous_erasure 209 # error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++2b" 210 # endif 211 # if __cpp_lib_associative_heterogeneous_erasure != 202110L 212 # error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++2b" 213 # endif 214 # else // _LIBCPP_VERSION 215 # ifdef __cpp_lib_associative_heterogeneous_erasure 216 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!" 217 # endif 218 # endif 219 220 # ifndef __cpp_lib_erase_if 221 # error "__cpp_lib_erase_if should be defined in c++2b" 222 # endif 223 # if __cpp_lib_erase_if != 202002L 224 # error "__cpp_lib_erase_if should have the value 202002L in c++2b" 225 # endif 226 227 # ifndef __cpp_lib_generic_unordered_lookup 228 # error "__cpp_lib_generic_unordered_lookup should be defined in c++2b" 229 # endif 230 # if __cpp_lib_generic_unordered_lookup != 201811L 231 # error "__cpp_lib_generic_unordered_lookup should have the value 201811L in c++2b" 232 # endif 233 234 # ifndef __cpp_lib_node_extract 235 # error "__cpp_lib_node_extract should be defined in c++2b" 236 # endif 237 # if __cpp_lib_node_extract != 201606L 238 # error "__cpp_lib_node_extract should have the value 201606L in c++2b" 239 # endif 240 241 # ifndef __cpp_lib_nonmember_container_access 242 # error "__cpp_lib_nonmember_container_access should be defined in c++2b" 243 # endif 244 # if __cpp_lib_nonmember_container_access != 201411L 245 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" 246 # endif 247 248 # if !defined(_LIBCPP_VERSION) 249 # ifndef __cpp_lib_ranges_to_container 250 # error "__cpp_lib_ranges_to_container should be defined in c++2b" 251 # endif 252 # if __cpp_lib_ranges_to_container != 202202L 253 # error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" 254 # endif 255 # else // _LIBCPP_VERSION 256 # ifdef __cpp_lib_ranges_to_container 257 # error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" 258 # endif 259 # endif 260 261 # ifndef __cpp_lib_unordered_map_try_emplace 262 # error "__cpp_lib_unordered_map_try_emplace should be defined in c++2b" 263 # endif 264 # if __cpp_lib_unordered_map_try_emplace != 201411L 265 # error "__cpp_lib_unordered_map_try_emplace should have the value 201411L in c++2b" 266 # endif 267 268 #endif // TEST_STD_VER > 20 269 270