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 // <set> 15 16 // Test the feature test macros defined by <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_associative_lookup 201304L [C++14] 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 <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_associative_lookup 46 # error "__cpp_lib_generic_associative_lookup should not be defined before c++14" 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 # ifndef __cpp_lib_generic_associative_lookup 76 # error "__cpp_lib_generic_associative_lookup should be defined in c++14" 77 # endif 78 # if __cpp_lib_generic_associative_lookup != 201304L 79 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++14" 80 # endif 81 82 # ifdef __cpp_lib_node_extract 83 # error "__cpp_lib_node_extract should not be defined before c++17" 84 # endif 85 86 # ifdef __cpp_lib_nonmember_container_access 87 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 88 # endif 89 90 # ifdef __cpp_lib_ranges_to_container 91 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 92 # endif 93 94 #elif TEST_STD_VER == 17 95 96 # ifndef __cpp_lib_allocator_traits_is_always_equal 97 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 98 # endif 99 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 100 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 101 # endif 102 103 # ifdef __cpp_lib_associative_heterogeneous_erasure 104 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 105 # endif 106 107 # ifdef __cpp_lib_erase_if 108 # error "__cpp_lib_erase_if should not be defined before c++20" 109 # endif 110 111 # ifndef __cpp_lib_generic_associative_lookup 112 # error "__cpp_lib_generic_associative_lookup should be defined in c++17" 113 # endif 114 # if __cpp_lib_generic_associative_lookup != 201304L 115 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++17" 116 # endif 117 118 # ifndef __cpp_lib_node_extract 119 # error "__cpp_lib_node_extract should be defined in c++17" 120 # endif 121 # if __cpp_lib_node_extract != 201606L 122 # error "__cpp_lib_node_extract should have the value 201606L in c++17" 123 # endif 124 125 # ifndef __cpp_lib_nonmember_container_access 126 # error "__cpp_lib_nonmember_container_access should be defined in c++17" 127 # endif 128 # if __cpp_lib_nonmember_container_access != 201411L 129 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 130 # endif 131 132 # ifdef __cpp_lib_ranges_to_container 133 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 134 # endif 135 136 #elif TEST_STD_VER == 20 137 138 # ifndef __cpp_lib_allocator_traits_is_always_equal 139 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20" 140 # endif 141 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 142 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20" 143 # endif 144 145 # ifdef __cpp_lib_associative_heterogeneous_erasure 146 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++2b" 147 # endif 148 149 # ifndef __cpp_lib_erase_if 150 # error "__cpp_lib_erase_if should be defined in c++20" 151 # endif 152 # if __cpp_lib_erase_if != 202002L 153 # error "__cpp_lib_erase_if should have the value 202002L in c++20" 154 # endif 155 156 # ifndef __cpp_lib_generic_associative_lookup 157 # error "__cpp_lib_generic_associative_lookup should be defined in c++20" 158 # endif 159 # if __cpp_lib_generic_associative_lookup != 201304L 160 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++20" 161 # endif 162 163 # ifndef __cpp_lib_node_extract 164 # error "__cpp_lib_node_extract should be defined in c++20" 165 # endif 166 # if __cpp_lib_node_extract != 201606L 167 # error "__cpp_lib_node_extract should have the value 201606L in c++20" 168 # endif 169 170 # ifndef __cpp_lib_nonmember_container_access 171 # error "__cpp_lib_nonmember_container_access should be defined in c++20" 172 # endif 173 # if __cpp_lib_nonmember_container_access != 201411L 174 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" 175 # endif 176 177 # ifdef __cpp_lib_ranges_to_container 178 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 179 # endif 180 181 #elif TEST_STD_VER > 20 182 183 # ifndef __cpp_lib_allocator_traits_is_always_equal 184 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2b" 185 # endif 186 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 187 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b" 188 # endif 189 190 # if !defined(_LIBCPP_VERSION) 191 # ifndef __cpp_lib_associative_heterogeneous_erasure 192 # error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++2b" 193 # endif 194 # if __cpp_lib_associative_heterogeneous_erasure != 202110L 195 # error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++2b" 196 # endif 197 # else // _LIBCPP_VERSION 198 # ifdef __cpp_lib_associative_heterogeneous_erasure 199 # error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!" 200 # endif 201 # endif 202 203 # ifndef __cpp_lib_erase_if 204 # error "__cpp_lib_erase_if should be defined in c++2b" 205 # endif 206 # if __cpp_lib_erase_if != 202002L 207 # error "__cpp_lib_erase_if should have the value 202002L in c++2b" 208 # endif 209 210 # ifndef __cpp_lib_generic_associative_lookup 211 # error "__cpp_lib_generic_associative_lookup should be defined in c++2b" 212 # endif 213 # if __cpp_lib_generic_associative_lookup != 201304L 214 # error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++2b" 215 # endif 216 217 # ifndef __cpp_lib_node_extract 218 # error "__cpp_lib_node_extract should be defined in c++2b" 219 # endif 220 # if __cpp_lib_node_extract != 201606L 221 # error "__cpp_lib_node_extract should have the value 201606L in c++2b" 222 # endif 223 224 # ifndef __cpp_lib_nonmember_container_access 225 # error "__cpp_lib_nonmember_container_access should be defined in c++2b" 226 # endif 227 # if __cpp_lib_nonmember_container_access != 201411L 228 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b" 229 # endif 230 231 # if !defined(_LIBCPP_VERSION) 232 # ifndef __cpp_lib_ranges_to_container 233 # error "__cpp_lib_ranges_to_container should be defined in c++2b" 234 # endif 235 # if __cpp_lib_ranges_to_container != 202202L 236 # error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" 237 # endif 238 # else // _LIBCPP_VERSION 239 # ifdef __cpp_lib_ranges_to_container 240 # error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" 241 # endif 242 # endif 243 244 #endif // TEST_STD_VER > 20 245 246