| 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 |
// <iterator> |
| 15 |
|
| 16 |
// Test the feature test macros defined by <iterator> |
| 17 |
|
| 18 |
/* Constant Value |
| 19 |
__cpp_lib_array_constexpr 201603L [C++17] |
| 20 |
201811L [C++20] |
| 21 |
__cpp_lib_constexpr_iterator 201811L [C++20] |
| 22 |
__cpp_lib_make_reverse_iterator 201402L [C++14] |
| 23 |
__cpp_lib_move_iterator_concept 202207L [C++20] |
| 24 |
__cpp_lib_nonmember_container_access 201411L [C++17] |
| 25 |
__cpp_lib_null_iterators 201304L [C++14] |
| 26 |
__cpp_lib_ranges 202110L [C++20] |
| 27 |
202211L [C++23] |
| 28 |
__cpp_lib_ssize 201902L [C++20] |
| 29 |
*/ |
| 30 |
|
| 31 |
#include <iterator> |
| 32 |
#include "test_macros.h" |
| 33 |
|
| 34 |
#if TEST_STD_VER < 14 |
| 35 |
|
| 36 |
# ifdef __cpp_lib_array_constexpr |
| 37 |
# error "__cpp_lib_array_constexpr should not be defined before c++17" |
| 38 |
# endif |
| 39 |
|
| 40 |
# ifdef __cpp_lib_constexpr_iterator |
| 41 |
# error "__cpp_lib_constexpr_iterator should not be defined before c++20" |
| 42 |
# endif |
| 43 |
|
| 44 |
# ifdef __cpp_lib_make_reverse_iterator |
| 45 |
# error "__cpp_lib_make_reverse_iterator should not be defined before c++14" |
| 46 |
# endif |
| 47 |
|
| 48 |
# ifdef __cpp_lib_move_iterator_concept |
| 49 |
# error "__cpp_lib_move_iterator_concept should not be defined before c++20" |
| 50 |
# endif |
| 51 |
|
| 52 |
# ifdef __cpp_lib_nonmember_container_access |
| 53 |
# error "__cpp_lib_nonmember_container_access should not be defined before c++17" |
| 54 |
# endif |
| 55 |
|
| 56 |
# ifdef __cpp_lib_null_iterators |
| 57 |
# error "__cpp_lib_null_iterators should not be defined before c++14" |
| 58 |
# endif |
| 59 |
|
| 60 |
# ifdef __cpp_lib_ranges |
| 61 |
# error "__cpp_lib_ranges should not be defined before c++20" |
| 62 |
# endif |
| 63 |
|
| 64 |
# ifdef __cpp_lib_ssize |
| 65 |
# error "__cpp_lib_ssize should not be defined before c++20" |
| 66 |
# endif |
| 67 |
|
| 68 |
#elif TEST_STD_VER == 14 |
| 69 |
|
| 70 |
# ifdef __cpp_lib_array_constexpr |
| 71 |
# error "__cpp_lib_array_constexpr should not be defined before c++17" |
| 72 |
# endif |
| 73 |
|
| 74 |
# ifdef __cpp_lib_constexpr_iterator |
| 75 |
# error "__cpp_lib_constexpr_iterator should not be defined before c++20" |
| 76 |
# endif |
| 77 |
|
| 78 |
# ifndef __cpp_lib_make_reverse_iterator |
| 79 |
# error "__cpp_lib_make_reverse_iterator should be defined in c++14" |
| 80 |
# endif |
| 81 |
# if __cpp_lib_make_reverse_iterator != 201402L |
| 82 |
# error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++14" |
| 83 |
# endif |
| 84 |
|
| 85 |
# ifdef __cpp_lib_move_iterator_concept |
| 86 |
# error "__cpp_lib_move_iterator_concept should not be defined before c++20" |
| 87 |
# endif |
| 88 |
|
| 89 |
# ifdef __cpp_lib_nonmember_container_access |
| 90 |
# error "__cpp_lib_nonmember_container_access should not be defined before c++17" |
| 91 |
# endif |
| 92 |
|
| 93 |
# ifndef __cpp_lib_null_iterators |
| 94 |
# error "__cpp_lib_null_iterators should be defined in c++14" |
| 95 |
# endif |
| 96 |
# if __cpp_lib_null_iterators != 201304L |
| 97 |
# error "__cpp_lib_null_iterators should have the value 201304L in c++14" |
| 98 |
# endif |
| 99 |
|
| 100 |
# ifdef __cpp_lib_ranges |
| 101 |
# error "__cpp_lib_ranges should not be defined before c++20" |
| 102 |
# endif |
| 103 |
|
| 104 |
# ifdef __cpp_lib_ssize |
| 105 |
# error "__cpp_lib_ssize should not be defined before c++20" |
| 106 |
# endif |
| 107 |
|
| 108 |
#elif TEST_STD_VER == 17 |
| 109 |
|
| 110 |
# ifndef __cpp_lib_array_constexpr |
| 111 |
# error "__cpp_lib_array_constexpr should be defined in c++17" |
| 112 |
# endif |
| 113 |
# if __cpp_lib_array_constexpr != 201603L |
| 114 |
# error "__cpp_lib_array_constexpr should have the value 201603L in c++17" |
| 115 |
# endif |
| 116 |
|
| 117 |
# ifdef __cpp_lib_constexpr_iterator |
| 118 |
# error "__cpp_lib_constexpr_iterator should not be defined before c++20" |
| 119 |
# endif |
| 120 |
|
| 121 |
# ifndef __cpp_lib_make_reverse_iterator |
| 122 |
# error "__cpp_lib_make_reverse_iterator should be defined in c++17" |
| 123 |
# endif |
| 124 |
# if __cpp_lib_make_reverse_iterator != 201402L |
| 125 |
# error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++17" |
| 126 |
# endif |
| 127 |
|
| 128 |
# ifdef __cpp_lib_move_iterator_concept |
| 129 |
# error "__cpp_lib_move_iterator_concept should not be defined before c++20" |
| 130 |
# endif |
| 131 |
|
| 132 |
# ifndef __cpp_lib_nonmember_container_access |
| 133 |
# error "__cpp_lib_nonmember_container_access should be defined in c++17" |
| 134 |
# endif |
| 135 |
# if __cpp_lib_nonmember_container_access != 201411L |
| 136 |
# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" |
| 137 |
# endif |
| 138 |
|
| 139 |
# ifndef __cpp_lib_null_iterators |
| 140 |
# error "__cpp_lib_null_iterators should be defined in c++17" |
| 141 |
# endif |
| 142 |
# if __cpp_lib_null_iterators != 201304L |
| 143 |
# error "__cpp_lib_null_iterators should have the value 201304L in c++17" |
| 144 |
# endif |
| 145 |
|
| 146 |
# ifdef __cpp_lib_ranges |
| 147 |
# error "__cpp_lib_ranges should not be defined before c++20" |
| 148 |
# endif |
| 149 |
|
| 150 |
# ifdef __cpp_lib_ssize |
| 151 |
# error "__cpp_lib_ssize should not be defined before c++20" |
| 152 |
# endif |
| 153 |
|
| 154 |
#elif TEST_STD_VER == 20 |
| 155 |
|
| 156 |
# ifndef __cpp_lib_array_constexpr |
| 157 |
# error "__cpp_lib_array_constexpr should be defined in c++20" |
| 158 |
# endif |
| 159 |
# if __cpp_lib_array_constexpr != 201811L |
| 160 |
# error "__cpp_lib_array_constexpr should have the value 201811L in c++20" |
| 161 |
# endif |
| 162 |
|
| 163 |
# ifndef __cpp_lib_constexpr_iterator |
| 164 |
# error "__cpp_lib_constexpr_iterator should be defined in c++20" |
| 165 |
# endif |
| 166 |
# if __cpp_lib_constexpr_iterator != 201811L |
| 167 |
# error "__cpp_lib_constexpr_iterator should have the value 201811L in c++20" |
| 168 |
# endif |
| 169 |
|
| 170 |
# ifndef __cpp_lib_make_reverse_iterator |
| 171 |
# error "__cpp_lib_make_reverse_iterator should be defined in c++20" |
| 172 |
# endif |
| 173 |
# if __cpp_lib_make_reverse_iterator != 201402L |
| 174 |
# error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++20" |
| 175 |
# endif |
| 176 |
|
| 177 |
# ifndef __cpp_lib_move_iterator_concept |
| 178 |
# error "__cpp_lib_move_iterator_concept should be defined in c++20" |
| 179 |
# endif |
| 180 |
# if __cpp_lib_move_iterator_concept != 202207L |
| 181 |
# error "__cpp_lib_move_iterator_concept should have the value 202207L in c++20" |
| 182 |
# endif |
| 183 |
|
| 184 |
# ifndef __cpp_lib_nonmember_container_access |
| 185 |
# error "__cpp_lib_nonmember_container_access should be defined in c++20" |
| 186 |
# endif |
| 187 |
# if __cpp_lib_nonmember_container_access != 201411L |
| 188 |
# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" |
| 189 |
# endif |
| 190 |
|
| 191 |
# ifndef __cpp_lib_null_iterators |
| 192 |
# error "__cpp_lib_null_iterators should be defined in c++20" |
| 193 |
# endif |
| 194 |
# if __cpp_lib_null_iterators != 201304L |
| 195 |
# error "__cpp_lib_null_iterators should have the value 201304L in c++20" |
| 196 |
# endif |
| 197 |
|
| 198 |
# ifndef __cpp_lib_ranges |
| 199 |
# error "__cpp_lib_ranges should be defined in c++20" |
| 200 |
# endif |
| 201 |
# if __cpp_lib_ranges != 202110L |
| 202 |
# error "__cpp_lib_ranges should have the value 202110L in c++20" |
| 203 |
# endif |
| 204 |
|
| 205 |
# ifndef __cpp_lib_ssize |
| 206 |
# error "__cpp_lib_ssize should be defined in c++20" |
| 207 |
# endif |
| 208 |
# if __cpp_lib_ssize != 201902L |
| 209 |
# error "__cpp_lib_ssize should have the value 201902L in c++20" |
| 210 |
# endif |
| 211 |
|
| 212 |
#elif TEST_STD_VER == 23 |
| 213 |
|
| 214 |
# ifndef __cpp_lib_array_constexpr |
| 215 |
# error "__cpp_lib_array_constexpr should be defined in c++23" |
| 216 |
# endif |
| 217 |
# if __cpp_lib_array_constexpr != 201811L |
| 218 |
# error "__cpp_lib_array_constexpr should have the value 201811L in c++23" |
| 219 |
# endif |
| 220 |
|
| 221 |
# ifndef __cpp_lib_constexpr_iterator |
| 222 |
# error "__cpp_lib_constexpr_iterator should be defined in c++23" |
| 223 |
# endif |
| 224 |
# if __cpp_lib_constexpr_iterator != 201811L |
| 225 |
# error "__cpp_lib_constexpr_iterator should have the value 201811L in c++23" |
| 226 |
# endif |
| 227 |
|
| 228 |
# ifndef __cpp_lib_make_reverse_iterator |
| 229 |
# error "__cpp_lib_make_reverse_iterator should be defined in c++23" |
| 230 |
# endif |
| 231 |
# if __cpp_lib_make_reverse_iterator != 201402L |
| 232 |
# error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++23" |
| 233 |
# endif |
| 234 |
|
| 235 |
# ifndef __cpp_lib_move_iterator_concept |
| 236 |
# error "__cpp_lib_move_iterator_concept should be defined in c++23" |
| 237 |
# endif |
| 238 |
# if __cpp_lib_move_iterator_concept != 202207L |
| 239 |
# error "__cpp_lib_move_iterator_concept should have the value 202207L in c++23" |
| 240 |
# endif |
| 241 |
|
| 242 |
# ifndef __cpp_lib_nonmember_container_access |
| 243 |
# error "__cpp_lib_nonmember_container_access should be defined in c++23" |
| 244 |
# endif |
| 245 |
# if __cpp_lib_nonmember_container_access != 201411L |
| 246 |
# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23" |
| 247 |
# endif |
| 248 |
|
| 249 |
# ifndef __cpp_lib_null_iterators |
| 250 |
# error "__cpp_lib_null_iterators should be defined in c++23" |
| 251 |
# endif |
| 252 |
# if __cpp_lib_null_iterators != 201304L |
| 253 |
# error "__cpp_lib_null_iterators should have the value 201304L in c++23" |
| 254 |
# endif |
| 255 |
|
| 256 |
# ifndef __cpp_lib_ranges |
| 257 |
# error "__cpp_lib_ranges should be defined in c++23" |
| 258 |
# endif |
| 259 |
# if __cpp_lib_ranges != 202211L |
| 260 |
# error "__cpp_lib_ranges should have the value 202211L in c++23" |
| 261 |
# endif |
| 262 |
|
| 263 |
# ifndef __cpp_lib_ssize |
| 264 |
# error "__cpp_lib_ssize should be defined in c++23" |
| 265 |
# endif |
| 266 |
# if __cpp_lib_ssize != 201902L |
| 267 |
# error "__cpp_lib_ssize should have the value 201902L in c++23" |
| 268 |
# endif |
| 269 |
|
| 270 |
#elif TEST_STD_VER > 23 |
| 271 |
|
| 272 |
# ifndef __cpp_lib_array_constexpr |
| 273 |
# error "__cpp_lib_array_constexpr should be defined in c++26" |
| 274 |
# endif |
| 275 |
# if __cpp_lib_array_constexpr != 201811L |
| 276 |
# error "__cpp_lib_array_constexpr should have the value 201811L in c++26" |
| 277 |
# endif |
| 278 |
|
| 279 |
# ifndef __cpp_lib_constexpr_iterator |
| 280 |
# error "__cpp_lib_constexpr_iterator should be defined in c++26" |
| 281 |
# endif |
| 282 |
# if __cpp_lib_constexpr_iterator != 201811L |
| 283 |
# error "__cpp_lib_constexpr_iterator should have the value 201811L in c++26" |
| 284 |
# endif |
| 285 |
|
| 286 |
# ifndef __cpp_lib_make_reverse_iterator |
| 287 |
# error "__cpp_lib_make_reverse_iterator should be defined in c++26" |
| 288 |
# endif |
| 289 |
# if __cpp_lib_make_reverse_iterator != 201402L |
| 290 |
# error "__cpp_lib_make_reverse_iterator should have the value 201402L in c++26" |
| 291 |
# endif |
| 292 |
|
| 293 |
# ifndef __cpp_lib_move_iterator_concept |
| 294 |
# error "__cpp_lib_move_iterator_concept should be defined in c++26" |
| 295 |
# endif |
| 296 |
# if __cpp_lib_move_iterator_concept != 202207L |
| 297 |
# error "__cpp_lib_move_iterator_concept should have the value 202207L in c++26" |
| 298 |
# endif |
| 299 |
|
| 300 |
# ifndef __cpp_lib_nonmember_container_access |
| 301 |
# error "__cpp_lib_nonmember_container_access should be defined in c++26" |
| 302 |
# endif |
| 303 |
# if __cpp_lib_nonmember_container_access != 201411L |
| 304 |
# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26" |
| 305 |
# endif |
| 306 |
|
| 307 |
# ifndef __cpp_lib_null_iterators |
| 308 |
# error "__cpp_lib_null_iterators should be defined in c++26" |
| 309 |
# endif |
| 310 |
# if __cpp_lib_null_iterators != 201304L |
| 311 |
# error "__cpp_lib_null_iterators should have the value 201304L in c++26" |
| 312 |
# endif |
| 313 |
|
| 314 |
# ifndef __cpp_lib_ranges |
| 315 |
# error "__cpp_lib_ranges should be defined in c++26" |
| 316 |
# endif |
| 317 |
# if __cpp_lib_ranges != 202211L |
| 318 |
# error "__cpp_lib_ranges should have the value 202211L in c++26" |
| 319 |
# endif |
| 320 |
|
| 321 |
# ifndef __cpp_lib_ssize |
| 322 |
# error "__cpp_lib_ssize should be defined in c++26" |
| 323 |
# endif |
| 324 |
# if __cpp_lib_ssize != 201902L |
| 325 |
# error "__cpp_lib_ssize should have the value 201902L in c++26" |
| 326 |
# endif |
| 327 |
|
| 328 |
#endif // TEST_STD_VER > 23 |
| 329 |
|