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_set> 15 16 // Test the feature test macros defined by <unordered_set> 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 */ 27 28 #include <unordered_set> 29 #include "test_macros.h" 30 31 #if TEST_STD_VER < 14 32 33 # ifdef __cpp_lib_allocator_traits_is_always_equal 34 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 35 # endif 36 37 # ifdef __cpp_lib_associative_heterogeneous_erasure 38 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 39 # endif 40 41 # ifdef __cpp_lib_erase_if 42 # error "__cpp_lib_erase_if should not be defined before c++20" 43 # endif 44 45 # ifdef __cpp_lib_generic_unordered_lookup 46 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++20" 47 # endif 48 49 # ifdef __cpp_lib_node_extract 50 # error "__cpp_lib_node_extract should not be defined before c++17" 51 # endif 52 53 # ifdef __cpp_lib_nonmember_container_access 54 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 55 # endif 56 57 # ifdef __cpp_lib_ranges_to_container 58 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 59 # endif 60 61 #elif TEST_STD_VER == 14 62 63 # ifdef __cpp_lib_allocator_traits_is_always_equal 64 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 65 # endif 66 67 # ifdef __cpp_lib_associative_heterogeneous_erasure 68 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 69 # endif 70 71 # ifdef __cpp_lib_erase_if 72 # error "__cpp_lib_erase_if should not be defined before c++20" 73 # endif 74 75 # ifdef __cpp_lib_generic_unordered_lookup 76 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++20" 77 # endif 78 79 # ifdef __cpp_lib_node_extract 80 # error "__cpp_lib_node_extract should not be defined before c++17" 81 # endif 82 83 # ifdef __cpp_lib_nonmember_container_access 84 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 85 # endif 86 87 # ifdef __cpp_lib_ranges_to_container 88 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 89 # endif 90 91 #elif TEST_STD_VER == 17 92 93 # ifndef __cpp_lib_allocator_traits_is_always_equal 94 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 95 # endif 96 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 97 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 98 # endif 99 100 # ifdef __cpp_lib_associative_heterogeneous_erasure 101 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 102 # endif 103 104 # ifdef __cpp_lib_erase_if 105 # error "__cpp_lib_erase_if should not be defined before c++20" 106 # endif 107 108 # ifdef __cpp_lib_generic_unordered_lookup 109 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++20" 110 # endif 111 112 # ifndef __cpp_lib_node_extract 113 # error "__cpp_lib_node_extract should be defined in c++17" 114 # endif 115 # if __cpp_lib_node_extract != 201606L 116 # error "__cpp_lib_node_extract should have the value 201606L in c++17" 117 # endif 118 119 # ifndef __cpp_lib_nonmember_container_access 120 # error "__cpp_lib_nonmember_container_access should be defined in c++17" 121 # endif 122 # if __cpp_lib_nonmember_container_access != 201411L 123 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 124 # endif 125 126 # ifdef __cpp_lib_ranges_to_container 127 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 128 # endif 129 130 #elif TEST_STD_VER == 20 131 132 # ifndef __cpp_lib_allocator_traits_is_always_equal 133 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20" 134 # endif 135 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 136 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20" 137 # endif 138 139 # ifdef __cpp_lib_associative_heterogeneous_erasure 140 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 141 # endif 142 143 # ifndef __cpp_lib_erase_if 144 # error "__cpp_lib_erase_if should be defined in c++20" 145 # endif 146 # if __cpp_lib_erase_if != 202002L 147 # error "__cpp_lib_erase_if should have the value 202002L in c++20" 148 # endif 149 150 # ifndef __cpp_lib_generic_unordered_lookup 151 # error "__cpp_lib_generic_unordered_lookup should be defined in c++20" 152 # endif 153 # if __cpp_lib_generic_unordered_lookup != 201811L 154 # error "__cpp_lib_generic_unordered_lookup should have the value 201811L in c++20" 155 # endif 156 157 # ifndef __cpp_lib_node_extract 158 # error "__cpp_lib_node_extract should be defined in c++20" 159 # endif 160 # if __cpp_lib_node_extract != 201606L 161 # error "__cpp_lib_node_extract should have the value 201606L in c++20" 162 # endif 163 164 # ifndef __cpp_lib_nonmember_container_access 165 # error "__cpp_lib_nonmember_container_access should be defined in c++20" 166 # endif 167 # if __cpp_lib_nonmember_container_access != 201411L 168 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" 169 # endif 170 171 # ifdef __cpp_lib_ranges_to_container 172 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 173 # endif 174 175 #elif TEST_STD_VER > 20 176 177 # ifndef __cpp_lib_allocator_traits_is_always_equal 178 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2b" 179 # endif 180 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 181 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b" 182 # endif 183 184 # if !defined(_LIBCPP_VERSION) 185 # ifndef __cpp_lib_associative_heterogeneous_erasure 186 # error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++2b" 187 # endif 188 # if __cpp_lib_associative_heterogeneous_erasure != 202110L 189 # error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++2b" 190 # endif 191 # else // _LIBCPP_VERSION 192 # ifdef __cpp_lib_associative_heterogeneous_erasure 193 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!" 194 # endif 195 # endif 196 197 # ifndef __cpp_lib_erase_if 198 # error "__cpp_lib_erase_if should be defined in c++2b" 199 # endif 200 # if __cpp_lib_erase_if != 202002L 201 # error "__cpp_lib_erase_if should have the value 202002L in c++2b" 202 # endif 203 204 # ifndef __cpp_lib_generic_unordered_lookup 205 # error "__cpp_lib_generic_unordered_lookup should be defined in c++2b" 206 # endif 207 # if __cpp_lib_generic_unordered_lookup != 201811L 208 # error "__cpp_lib_generic_unordered_lookup should have the value 201811L in c++2b" 209 # endif 210 211 # ifndef __cpp_lib_node_extract 212 # error "__cpp_lib_node_extract should be defined in c++2b" 213 # endif 214 # if __cpp_lib_node_extract != 201606L 215 # error "__cpp_lib_node_extract should have the value 201606L in c++2b" 216 # endif 217 218 # ifndef __cpp_lib_nonmember_container_access 219 # error "__cpp_lib_nonmember_container_access should be defined in c++2b" 220 # endif 221 # if __cpp_lib_nonmember_container_access != 201411L 222 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" 223 # endif 224 225 # if !defined(_LIBCPP_VERSION) 226 # ifndef __cpp_lib_ranges_to_container 227 # error "__cpp_lib_ranges_to_container should be defined in c++2b" 228 # endif 229 # if __cpp_lib_ranges_to_container != 202202L 230 # error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" 231 # endif 232 # else // _LIBCPP_VERSION 233 # ifdef __cpp_lib_ranges_to_container 234 # error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" 235 # endif 236 # endif 237 238 #endif // TEST_STD_VER > 20 239 240