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 // <map> 15 16 // Test the feature test macros defined by <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_associative_lookup 201304L [C++14] 23 __cpp_lib_map_try_emplace 201411L [C++17] 24 __cpp_lib_node_extract 201606L [C++17] 25 __cpp_lib_nonmember_container_access 201411L [C++17] 26 __cpp_lib_ranges_to_container 202202L [C++2b] 27 */ 28 29 #include <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_associative_lookup 47 # error "__cpp_lib_generic_associative_lookup should not be defined before c++14" 48 # endif 49 50 # ifdef __cpp_lib_map_try_emplace 51 # error "__cpp_lib_map_try_emplace should not be defined before c++17" 52 # endif 53 54 # ifdef __cpp_lib_node_extract 55 # error "__cpp_lib_node_extract should not be defined before c++17" 56 # endif 57 58 # ifdef __cpp_lib_nonmember_container_access 59 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 60 # endif 61 62 # ifdef __cpp_lib_ranges_to_container 63 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 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 # ifndef __cpp_lib_generic_associative_lookup 81 # error "__cpp_lib_generic_associative_lookup should be defined in c++14" 82 # endif 83 # if __cpp_lib_generic_associative_lookup != 201304L 84 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++14" 85 # endif 86 87 # ifdef __cpp_lib_map_try_emplace 88 # error "__cpp_lib_map_try_emplace should not be defined before c++17" 89 # endif 90 91 # ifdef __cpp_lib_node_extract 92 # error "__cpp_lib_node_extract should not be defined before c++17" 93 # endif 94 95 # ifdef __cpp_lib_nonmember_container_access 96 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 97 # endif 98 99 # ifdef __cpp_lib_ranges_to_container 100 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 101 # endif 102 103 #elif TEST_STD_VER == 17 104 105 # ifndef __cpp_lib_allocator_traits_is_always_equal 106 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 107 # endif 108 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 109 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 110 # endif 111 112 # ifdef __cpp_lib_associative_heterogeneous_erasure 113 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 114 # endif 115 116 # ifdef __cpp_lib_erase_if 117 # error "__cpp_lib_erase_if should not be defined before c++20" 118 # endif 119 120 # ifndef __cpp_lib_generic_associative_lookup 121 # error "__cpp_lib_generic_associative_lookup should be defined in c++17" 122 # endif 123 # if __cpp_lib_generic_associative_lookup != 201304L 124 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++17" 125 # endif 126 127 # ifndef __cpp_lib_map_try_emplace 128 # error "__cpp_lib_map_try_emplace should be defined in c++17" 129 # endif 130 # if __cpp_lib_map_try_emplace != 201411L 131 # error "__cpp_lib_map_try_emplace should have the value 201411L in c++17" 132 # endif 133 134 # ifndef __cpp_lib_node_extract 135 # error "__cpp_lib_node_extract should be defined in c++17" 136 # endif 137 # if __cpp_lib_node_extract != 201606L 138 # error "__cpp_lib_node_extract should have the value 201606L in c++17" 139 # endif 140 141 # ifndef __cpp_lib_nonmember_container_access 142 # error "__cpp_lib_nonmember_container_access should be defined in c++17" 143 # endif 144 # if __cpp_lib_nonmember_container_access != 201411L 145 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 146 # endif 147 148 # ifdef __cpp_lib_ranges_to_container 149 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 150 # endif 151 152 #elif TEST_STD_VER == 20 153 154 # ifndef __cpp_lib_allocator_traits_is_always_equal 155 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20" 156 # endif 157 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 158 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20" 159 # endif 160 161 # ifdef __cpp_lib_associative_heterogeneous_erasure 162 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 163 # endif 164 165 # ifndef __cpp_lib_erase_if 166 # error "__cpp_lib_erase_if should be defined in c++20" 167 # endif 168 # if __cpp_lib_erase_if != 202002L 169 # error "__cpp_lib_erase_if should have the value 202002L in c++20" 170 # endif 171 172 # ifndef __cpp_lib_generic_associative_lookup 173 # error "__cpp_lib_generic_associative_lookup should be defined in c++20" 174 # endif 175 # if __cpp_lib_generic_associative_lookup != 201304L 176 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++20" 177 # endif 178 179 # ifndef __cpp_lib_map_try_emplace 180 # error "__cpp_lib_map_try_emplace should be defined in c++20" 181 # endif 182 # if __cpp_lib_map_try_emplace != 201411L 183 # error "__cpp_lib_map_try_emplace should have the value 201411L in c++20" 184 # endif 185 186 # ifndef __cpp_lib_node_extract 187 # error "__cpp_lib_node_extract should be defined in c++20" 188 # endif 189 # if __cpp_lib_node_extract != 201606L 190 # error "__cpp_lib_node_extract should have the value 201606L in c++20" 191 # endif 192 193 # ifndef __cpp_lib_nonmember_container_access 194 # error "__cpp_lib_nonmember_container_access should be defined in c++20" 195 # endif 196 # if __cpp_lib_nonmember_container_access != 201411L 197 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" 198 # endif 199 200 # ifdef __cpp_lib_ranges_to_container 201 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 202 # endif 203 204 #elif TEST_STD_VER > 20 205 206 # ifndef __cpp_lib_allocator_traits_is_always_equal 207 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2b" 208 # endif 209 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 210 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b" 211 # endif 212 213 # if !defined(_LIBCPP_VERSION) 214 # ifndef __cpp_lib_associative_heterogeneous_erasure 215 # error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++2b" 216 # endif 217 # if __cpp_lib_associative_heterogeneous_erasure != 202110L 218 # error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++2b" 219 # endif 220 # else // _LIBCPP_VERSION 221 # ifdef __cpp_lib_associative_heterogeneous_erasure 222 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!" 223 # endif 224 # endif 225 226 # ifndef __cpp_lib_erase_if 227 # error "__cpp_lib_erase_if should be defined in c++2b" 228 # endif 229 # if __cpp_lib_erase_if != 202002L 230 # error "__cpp_lib_erase_if should have the value 202002L in c++2b" 231 # endif 232 233 # ifndef __cpp_lib_generic_associative_lookup 234 # error "__cpp_lib_generic_associative_lookup should be defined in c++2b" 235 # endif 236 # if __cpp_lib_generic_associative_lookup != 201304L 237 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++2b" 238 # endif 239 240 # ifndef __cpp_lib_map_try_emplace 241 # error "__cpp_lib_map_try_emplace should be defined in c++2b" 242 # endif 243 # if __cpp_lib_map_try_emplace != 201411L 244 # error "__cpp_lib_map_try_emplace should have the value 201411L in c++2b" 245 # endif 246 247 # ifndef __cpp_lib_node_extract 248 # error "__cpp_lib_node_extract should be defined in c++2b" 249 # endif 250 # if __cpp_lib_node_extract != 201606L 251 # error "__cpp_lib_node_extract should have the value 201606L in c++2b" 252 # endif 253 254 # ifndef __cpp_lib_nonmember_container_access 255 # error "__cpp_lib_nonmember_container_access should be defined in c++2b" 256 # endif 257 # if __cpp_lib_nonmember_container_access != 201411L 258 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" 259 # endif 260 261 # if !defined(_LIBCPP_VERSION) 262 # ifndef __cpp_lib_ranges_to_container 263 # error "__cpp_lib_ranges_to_container should be defined in c++2b" 264 # endif 265 # if __cpp_lib_ranges_to_container != 202202L 266 # error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" 267 # endif 268 # else // _LIBCPP_VERSION 269 # ifdef __cpp_lib_ranges_to_container 270 # error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" 271 # endif 272 # endif 273 274 #endif // TEST_STD_VER > 20 275 276