| 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 |
// <memory> |
| 15 |
|
| 16 |
// Test the feature test macros defined by <memory> |
| 17 |
|
| 18 |
/* Constant Value |
| 19 |
__cpp_lib_addressof_constexpr 201603L [C++17] |
| 20 |
__cpp_lib_allocate_at_least 202302L [C++23] |
| 21 |
__cpp_lib_allocator_traits_is_always_equal 201411L [C++17] |
| 22 |
__cpp_lib_assume_aligned 201811L [C++20] |
| 23 |
__cpp_lib_atomic_value_initialization 201911L [C++20] |
| 24 |
__cpp_lib_constexpr_dynamic_alloc 201907L [C++20] |
| 25 |
__cpp_lib_constexpr_memory 201811L [C++20] |
| 26 |
202202L [C++23] |
| 27 |
__cpp_lib_enable_shared_from_this 201603L [C++17] |
| 28 |
__cpp_lib_make_unique 201304L [C++14] |
| 29 |
__cpp_lib_out_ptr 202106L [C++23] |
| 30 |
202311L [C++26] |
| 31 |
__cpp_lib_ranges 202110L [C++20] |
| 32 |
202211L [C++23] |
| 33 |
__cpp_lib_raw_memory_algorithms 201606L [C++17] |
| 34 |
__cpp_lib_shared_ptr_arrays 201611L [C++17] |
| 35 |
201707L [C++20] |
| 36 |
__cpp_lib_shared_ptr_weak_type 201606L [C++17] |
| 37 |
__cpp_lib_smart_ptr_for_overwrite 202002L [C++20] |
| 38 |
__cpp_lib_smart_ptr_owner_equality 202306L [C++26] |
| 39 |
__cpp_lib_to_address 201711L [C++20] |
| 40 |
__cpp_lib_transparent_operators 201210L [C++14] |
| 41 |
201510L [C++17] |
| 42 |
*/ |
| 43 |
|
| 44 |
#include <memory> |
| 45 |
#include "test_macros.h" |
| 46 |
|
| 47 |
#if TEST_STD_VER < 14 |
| 48 |
|
| 49 |
# ifdef __cpp_lib_addressof_constexpr |
| 50 |
# error "__cpp_lib_addressof_constexpr should not be defined before c++17" |
| 51 |
# endif |
| 52 |
|
| 53 |
# ifdef __cpp_lib_allocate_at_least |
| 54 |
# error "__cpp_lib_allocate_at_least should not be defined before c++23" |
| 55 |
# endif |
| 56 |
|
| 57 |
# ifdef __cpp_lib_allocator_traits_is_always_equal |
| 58 |
# error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" |
| 59 |
# endif |
| 60 |
|
| 61 |
# ifdef __cpp_lib_assume_aligned |
| 62 |
# error "__cpp_lib_assume_aligned should not be defined before c++20" |
| 63 |
# endif |
| 64 |
|
| 65 |
# ifdef __cpp_lib_atomic_value_initialization |
| 66 |
# error "__cpp_lib_atomic_value_initialization should not be defined before c++20" |
| 67 |
# endif |
| 68 |
|
| 69 |
# ifdef __cpp_lib_constexpr_dynamic_alloc |
| 70 |
# error "__cpp_lib_constexpr_dynamic_alloc should not be defined before c++20" |
| 71 |
# endif |
| 72 |
|
| 73 |
# ifdef __cpp_lib_constexpr_memory |
| 74 |
# error "__cpp_lib_constexpr_memory should not be defined before c++20" |
| 75 |
# endif |
| 76 |
|
| 77 |
# ifdef __cpp_lib_enable_shared_from_this |
| 78 |
# error "__cpp_lib_enable_shared_from_this should not be defined before c++17" |
| 79 |
# endif |
| 80 |
|
| 81 |
# ifdef __cpp_lib_make_unique |
| 82 |
# error "__cpp_lib_make_unique should not be defined before c++14" |
| 83 |
# endif |
| 84 |
|
| 85 |
# ifdef __cpp_lib_out_ptr |
| 86 |
# error "__cpp_lib_out_ptr should not be defined before c++23" |
| 87 |
# endif |
| 88 |
|
| 89 |
# ifdef __cpp_lib_ranges |
| 90 |
# error "__cpp_lib_ranges should not be defined before c++20" |
| 91 |
# endif |
| 92 |
|
| 93 |
# ifdef __cpp_lib_raw_memory_algorithms |
| 94 |
# error "__cpp_lib_raw_memory_algorithms should not be defined before c++17" |
| 95 |
# endif |
| 96 |
|
| 97 |
# ifdef __cpp_lib_shared_ptr_arrays |
| 98 |
# error "__cpp_lib_shared_ptr_arrays should not be defined before c++17" |
| 99 |
# endif |
| 100 |
|
| 101 |
# ifdef __cpp_lib_shared_ptr_weak_type |
| 102 |
# error "__cpp_lib_shared_ptr_weak_type should not be defined before c++17" |
| 103 |
# endif |
| 104 |
|
| 105 |
# ifdef __cpp_lib_smart_ptr_for_overwrite |
| 106 |
# error "__cpp_lib_smart_ptr_for_overwrite should not be defined before c++20" |
| 107 |
# endif |
| 108 |
|
| 109 |
# ifdef __cpp_lib_smart_ptr_owner_equality |
| 110 |
# error "__cpp_lib_smart_ptr_owner_equality should not be defined before c++26" |
| 111 |
# endif |
| 112 |
|
| 113 |
# ifdef __cpp_lib_to_address |
| 114 |
# error "__cpp_lib_to_address should not be defined before c++20" |
| 115 |
# endif |
| 116 |
|
| 117 |
# ifdef __cpp_lib_transparent_operators |
| 118 |
# error "__cpp_lib_transparent_operators should not be defined before c++14" |
| 119 |
# endif |
| 120 |
|
| 121 |
#elif TEST_STD_VER == 14 |
| 122 |
|
| 123 |
# ifdef __cpp_lib_addressof_constexpr |
| 124 |
# error "__cpp_lib_addressof_constexpr should not be defined before c++17" |
| 125 |
# endif |
| 126 |
|
| 127 |
# ifdef __cpp_lib_allocate_at_least |
| 128 |
# error "__cpp_lib_allocate_at_least should not be defined before c++23" |
| 129 |
# endif |
| 130 |
|
| 131 |
# ifdef __cpp_lib_allocator_traits_is_always_equal |
| 132 |
# error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" |
| 133 |
# endif |
| 134 |
|
| 135 |
# ifdef __cpp_lib_assume_aligned |
| 136 |
# error "__cpp_lib_assume_aligned should not be defined before c++20" |
| 137 |
# endif |
| 138 |
|
| 139 |
# ifdef __cpp_lib_atomic_value_initialization |
| 140 |
# error "__cpp_lib_atomic_value_initialization should not be defined before c++20" |
| 141 |
# endif |
| 142 |
|
| 143 |
# ifdef __cpp_lib_constexpr_dynamic_alloc |
| 144 |
# error "__cpp_lib_constexpr_dynamic_alloc should not be defined before c++20" |
| 145 |
# endif |
| 146 |
|
| 147 |
# ifdef __cpp_lib_constexpr_memory |
| 148 |
# error "__cpp_lib_constexpr_memory should not be defined before c++20" |
| 149 |
# endif |
| 150 |
|
| 151 |
# ifdef __cpp_lib_enable_shared_from_this |
| 152 |
# error "__cpp_lib_enable_shared_from_this should not be defined before c++17" |
| 153 |
# endif |
| 154 |
|
| 155 |
# ifndef __cpp_lib_make_unique |
| 156 |
# error "__cpp_lib_make_unique should be defined in c++14" |
| 157 |
# endif |
| 158 |
# if __cpp_lib_make_unique != 201304L |
| 159 |
# error "__cpp_lib_make_unique should have the value 201304L in c++14" |
| 160 |
# endif |
| 161 |
|
| 162 |
# ifdef __cpp_lib_out_ptr |
| 163 |
# error "__cpp_lib_out_ptr should not be defined before c++23" |
| 164 |
# endif |
| 165 |
|
| 166 |
# ifdef __cpp_lib_ranges |
| 167 |
# error "__cpp_lib_ranges should not be defined before c++20" |
| 168 |
# endif |
| 169 |
|
| 170 |
# ifdef __cpp_lib_raw_memory_algorithms |
| 171 |
# error "__cpp_lib_raw_memory_algorithms should not be defined before c++17" |
| 172 |
# endif |
| 173 |
|
| 174 |
# ifdef __cpp_lib_shared_ptr_arrays |
| 175 |
# error "__cpp_lib_shared_ptr_arrays should not be defined before c++17" |
| 176 |
# endif |
| 177 |
|
| 178 |
# ifdef __cpp_lib_shared_ptr_weak_type |
| 179 |
# error "__cpp_lib_shared_ptr_weak_type should not be defined before c++17" |
| 180 |
# endif |
| 181 |
|
| 182 |
# ifdef __cpp_lib_smart_ptr_for_overwrite |
| 183 |
# error "__cpp_lib_smart_ptr_for_overwrite should not be defined before c++20" |
| 184 |
# endif |
| 185 |
|
| 186 |
# ifdef __cpp_lib_smart_ptr_owner_equality |
| 187 |
# error "__cpp_lib_smart_ptr_owner_equality should not be defined before c++26" |
| 188 |
# endif |
| 189 |
|
| 190 |
# ifdef __cpp_lib_to_address |
| 191 |
# error "__cpp_lib_to_address should not be defined before c++20" |
| 192 |
# endif |
| 193 |
|
| 194 |
# ifndef __cpp_lib_transparent_operators |
| 195 |
# error "__cpp_lib_transparent_operators should be defined in c++14" |
| 196 |
# endif |
| 197 |
# if __cpp_lib_transparent_operators != 201210L |
| 198 |
# error "__cpp_lib_transparent_operators should have the value 201210L in c++14" |
| 199 |
# endif |
| 200 |
|
| 201 |
#elif TEST_STD_VER == 17 |
| 202 |
|
| 203 |
# ifndef __cpp_lib_addressof_constexpr |
| 204 |
# error "__cpp_lib_addressof_constexpr should be defined in c++17" |
| 205 |
# endif |
| 206 |
# if __cpp_lib_addressof_constexpr != 201603L |
| 207 |
# error "__cpp_lib_addressof_constexpr should have the value 201603L in c++17" |
| 208 |
# endif |
| 209 |
|
| 210 |
# ifdef __cpp_lib_allocate_at_least |
| 211 |
# error "__cpp_lib_allocate_at_least should not be defined before c++23" |
| 212 |
# endif |
| 213 |
|
| 214 |
# ifndef __cpp_lib_allocator_traits_is_always_equal |
| 215 |
# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" |
| 216 |
# endif |
| 217 |
# if __cpp_lib_allocator_traits_is_always_equal != 201411L |
| 218 |
# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" |
| 219 |
# endif |
| 220 |
|
| 221 |
# ifdef __cpp_lib_assume_aligned |
| 222 |
# error "__cpp_lib_assume_aligned should not be defined before c++20" |
| 223 |
# endif |
| 224 |
|
| 225 |
# ifdef __cpp_lib_atomic_value_initialization |
| 226 |
# error "__cpp_lib_atomic_value_initialization should not be defined before c++20" |
| 227 |
# endif |
| 228 |
|
| 229 |
# ifdef __cpp_lib_constexpr_dynamic_alloc |
| 230 |
# error "__cpp_lib_constexpr_dynamic_alloc should not be defined before c++20" |
| 231 |
# endif |
| 232 |
|
| 233 |
# ifdef __cpp_lib_constexpr_memory |
| 234 |
# error "__cpp_lib_constexpr_memory should not be defined before c++20" |
| 235 |
# endif |
| 236 |
|
| 237 |
# ifndef __cpp_lib_enable_shared_from_this |
| 238 |
# error "__cpp_lib_enable_shared_from_this should be defined in c++17" |
| 239 |
# endif |
| 240 |
# if __cpp_lib_enable_shared_from_this != 201603L |
| 241 |
# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++17" |
| 242 |
# endif |
| 243 |
|
| 244 |
# ifndef __cpp_lib_make_unique |
| 245 |
# error "__cpp_lib_make_unique should be defined in c++17" |
| 246 |
# endif |
| 247 |
# if __cpp_lib_make_unique != 201304L |
| 248 |
# error "__cpp_lib_make_unique should have the value 201304L in c++17" |
| 249 |
# endif |
| 250 |
|
| 251 |
# ifdef __cpp_lib_out_ptr |
| 252 |
# error "__cpp_lib_out_ptr should not be defined before c++23" |
| 253 |
# endif |
| 254 |
|
| 255 |
# ifdef __cpp_lib_ranges |
| 256 |
# error "__cpp_lib_ranges should not be defined before c++20" |
| 257 |
# endif |
| 258 |
|
| 259 |
# ifndef __cpp_lib_raw_memory_algorithms |
| 260 |
# error "__cpp_lib_raw_memory_algorithms should be defined in c++17" |
| 261 |
# endif |
| 262 |
# if __cpp_lib_raw_memory_algorithms != 201606L |
| 263 |
# error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++17" |
| 264 |
# endif |
| 265 |
|
| 266 |
# ifndef __cpp_lib_shared_ptr_arrays |
| 267 |
# error "__cpp_lib_shared_ptr_arrays should be defined in c++17" |
| 268 |
# endif |
| 269 |
# if __cpp_lib_shared_ptr_arrays != 201611L |
| 270 |
# error "__cpp_lib_shared_ptr_arrays should have the value 201611L in c++17" |
| 271 |
# endif |
| 272 |
|
| 273 |
# ifndef __cpp_lib_shared_ptr_weak_type |
| 274 |
# error "__cpp_lib_shared_ptr_weak_type should be defined in c++17" |
| 275 |
# endif |
| 276 |
# if __cpp_lib_shared_ptr_weak_type != 201606L |
| 277 |
# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++17" |
| 278 |
# endif |
| 279 |
|
| 280 |
# ifdef __cpp_lib_smart_ptr_for_overwrite |
| 281 |
# error "__cpp_lib_smart_ptr_for_overwrite should not be defined before c++20" |
| 282 |
# endif |
| 283 |
|
| 284 |
# ifdef __cpp_lib_smart_ptr_owner_equality |
| 285 |
# error "__cpp_lib_smart_ptr_owner_equality should not be defined before c++26" |
| 286 |
# endif |
| 287 |
|
| 288 |
# ifdef __cpp_lib_to_address |
| 289 |
# error "__cpp_lib_to_address should not be defined before c++20" |
| 290 |
# endif |
| 291 |
|
| 292 |
# ifndef __cpp_lib_transparent_operators |
| 293 |
# error "__cpp_lib_transparent_operators should be defined in c++17" |
| 294 |
# endif |
| 295 |
# if __cpp_lib_transparent_operators != 201510L |
| 296 |
# error "__cpp_lib_transparent_operators should have the value 201510L in c++17" |
| 297 |
# endif |
| 298 |
|
| 299 |
#elif TEST_STD_VER == 20 |
| 300 |
|
| 301 |
# ifndef __cpp_lib_addressof_constexpr |
| 302 |
# error "__cpp_lib_addressof_constexpr should be defined in c++20" |
| 303 |
# endif |
| 304 |
# if __cpp_lib_addressof_constexpr != 201603L |
| 305 |
# error "__cpp_lib_addressof_constexpr should have the value 201603L in c++20" |
| 306 |
# endif |
| 307 |
|
| 308 |
# ifdef __cpp_lib_allocate_at_least |
| 309 |
# error "__cpp_lib_allocate_at_least should not be defined before c++23" |
| 310 |
# endif |
| 311 |
|
| 312 |
# ifndef __cpp_lib_allocator_traits_is_always_equal |
| 313 |
# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20" |
| 314 |
# endif |
| 315 |
# if __cpp_lib_allocator_traits_is_always_equal != 201411L |
| 316 |
# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20" |
| 317 |
# endif |
| 318 |
|
| 319 |
# ifndef __cpp_lib_assume_aligned |
| 320 |
# error "__cpp_lib_assume_aligned should be defined in c++20" |
| 321 |
# endif |
| 322 |
# if __cpp_lib_assume_aligned != 201811L |
| 323 |
# error "__cpp_lib_assume_aligned should have the value 201811L in c++20" |
| 324 |
# endif |
| 325 |
|
| 326 |
# ifndef __cpp_lib_atomic_value_initialization |
| 327 |
# error "__cpp_lib_atomic_value_initialization should be defined in c++20" |
| 328 |
# endif |
| 329 |
# if __cpp_lib_atomic_value_initialization != 201911L |
| 330 |
# error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++20" |
| 331 |
# endif |
| 332 |
|
| 333 |
# ifndef __cpp_lib_constexpr_dynamic_alloc |
| 334 |
# error "__cpp_lib_constexpr_dynamic_alloc should be defined in c++20" |
| 335 |
# endif |
| 336 |
# if __cpp_lib_constexpr_dynamic_alloc != 201907L |
| 337 |
# error "__cpp_lib_constexpr_dynamic_alloc should have the value 201907L in c++20" |
| 338 |
# endif |
| 339 |
|
| 340 |
# ifndef __cpp_lib_constexpr_memory |
| 341 |
# error "__cpp_lib_constexpr_memory should be defined in c++20" |
| 342 |
# endif |
| 343 |
# if __cpp_lib_constexpr_memory != 201811L |
| 344 |
# error "__cpp_lib_constexpr_memory should have the value 201811L in c++20" |
| 345 |
# endif |
| 346 |
|
| 347 |
# ifndef __cpp_lib_enable_shared_from_this |
| 348 |
# error "__cpp_lib_enable_shared_from_this should be defined in c++20" |
| 349 |
# endif |
| 350 |
# if __cpp_lib_enable_shared_from_this != 201603L |
| 351 |
# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++20" |
| 352 |
# endif |
| 353 |
|
| 354 |
# ifndef __cpp_lib_make_unique |
| 355 |
# error "__cpp_lib_make_unique should be defined in c++20" |
| 356 |
# endif |
| 357 |
# if __cpp_lib_make_unique != 201304L |
| 358 |
# error "__cpp_lib_make_unique should have the value 201304L in c++20" |
| 359 |
# endif |
| 360 |
|
| 361 |
# ifdef __cpp_lib_out_ptr |
| 362 |
# error "__cpp_lib_out_ptr should not be defined before c++23" |
| 363 |
# endif |
| 364 |
|
| 365 |
# ifndef __cpp_lib_ranges |
| 366 |
# error "__cpp_lib_ranges should be defined in c++20" |
| 367 |
# endif |
| 368 |
# if __cpp_lib_ranges != 202110L |
| 369 |
# error "__cpp_lib_ranges should have the value 202110L in c++20" |
| 370 |
# endif |
| 371 |
|
| 372 |
# ifndef __cpp_lib_raw_memory_algorithms |
| 373 |
# error "__cpp_lib_raw_memory_algorithms should be defined in c++20" |
| 374 |
# endif |
| 375 |
# if __cpp_lib_raw_memory_algorithms != 201606L |
| 376 |
# error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++20" |
| 377 |
# endif |
| 378 |
|
| 379 |
# ifndef __cpp_lib_shared_ptr_arrays |
| 380 |
# error "__cpp_lib_shared_ptr_arrays should be defined in c++20" |
| 381 |
# endif |
| 382 |
# if __cpp_lib_shared_ptr_arrays != 201707L |
| 383 |
# error "__cpp_lib_shared_ptr_arrays should have the value 201707L in c++20" |
| 384 |
# endif |
| 385 |
|
| 386 |
# ifndef __cpp_lib_shared_ptr_weak_type |
| 387 |
# error "__cpp_lib_shared_ptr_weak_type should be defined in c++20" |
| 388 |
# endif |
| 389 |
# if __cpp_lib_shared_ptr_weak_type != 201606L |
| 390 |
# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++20" |
| 391 |
# endif |
| 392 |
|
| 393 |
# if !defined(_LIBCPP_VERSION) |
| 394 |
# ifndef __cpp_lib_smart_ptr_for_overwrite |
| 395 |
# error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++20" |
| 396 |
# endif |
| 397 |
# if __cpp_lib_smart_ptr_for_overwrite != 202002L |
| 398 |
# error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++20" |
| 399 |
# endif |
| 400 |
# else // _LIBCPP_VERSION |
| 401 |
# ifdef __cpp_lib_smart_ptr_for_overwrite |
| 402 |
# error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!" |
| 403 |
# endif |
| 404 |
# endif |
| 405 |
|
| 406 |
# ifdef __cpp_lib_smart_ptr_owner_equality |
| 407 |
# error "__cpp_lib_smart_ptr_owner_equality should not be defined before c++26" |
| 408 |
# endif |
| 409 |
|
| 410 |
# ifndef __cpp_lib_to_address |
| 411 |
# error "__cpp_lib_to_address should be defined in c++20" |
| 412 |
# endif |
| 413 |
# if __cpp_lib_to_address != 201711L |
| 414 |
# error "__cpp_lib_to_address should have the value 201711L in c++20" |
| 415 |
# endif |
| 416 |
|
| 417 |
# ifndef __cpp_lib_transparent_operators |
| 418 |
# error "__cpp_lib_transparent_operators should be defined in c++20" |
| 419 |
# endif |
| 420 |
# if __cpp_lib_transparent_operators != 201510L |
| 421 |
# error "__cpp_lib_transparent_operators should have the value 201510L in c++20" |
| 422 |
# endif |
| 423 |
|
| 424 |
#elif TEST_STD_VER == 23 |
| 425 |
|
| 426 |
# ifndef __cpp_lib_addressof_constexpr |
| 427 |
# error "__cpp_lib_addressof_constexpr should be defined in c++23" |
| 428 |
# endif |
| 429 |
# if __cpp_lib_addressof_constexpr != 201603L |
| 430 |
# error "__cpp_lib_addressof_constexpr should have the value 201603L in c++23" |
| 431 |
# endif |
| 432 |
|
| 433 |
# ifndef __cpp_lib_allocate_at_least |
| 434 |
# error "__cpp_lib_allocate_at_least should be defined in c++23" |
| 435 |
# endif |
| 436 |
# if __cpp_lib_allocate_at_least != 202302L |
| 437 |
# error "__cpp_lib_allocate_at_least should have the value 202302L in c++23" |
| 438 |
# endif |
| 439 |
|
| 440 |
# ifndef __cpp_lib_allocator_traits_is_always_equal |
| 441 |
# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23" |
| 442 |
# endif |
| 443 |
# if __cpp_lib_allocator_traits_is_always_equal != 201411L |
| 444 |
# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++23" |
| 445 |
# endif |
| 446 |
|
| 447 |
# ifndef __cpp_lib_assume_aligned |
| 448 |
# error "__cpp_lib_assume_aligned should be defined in c++23" |
| 449 |
# endif |
| 450 |
# if __cpp_lib_assume_aligned != 201811L |
| 451 |
# error "__cpp_lib_assume_aligned should have the value 201811L in c++23" |
| 452 |
# endif |
| 453 |
|
| 454 |
# ifndef __cpp_lib_atomic_value_initialization |
| 455 |
# error "__cpp_lib_atomic_value_initialization should be defined in c++23" |
| 456 |
# endif |
| 457 |
# if __cpp_lib_atomic_value_initialization != 201911L |
| 458 |
# error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++23" |
| 459 |
# endif |
| 460 |
|
| 461 |
# ifndef __cpp_lib_constexpr_dynamic_alloc |
| 462 |
# error "__cpp_lib_constexpr_dynamic_alloc should be defined in c++23" |
| 463 |
# endif |
| 464 |
# if __cpp_lib_constexpr_dynamic_alloc != 201907L |
| 465 |
# error "__cpp_lib_constexpr_dynamic_alloc should have the value 201907L in c++23" |
| 466 |
# endif |
| 467 |
|
| 468 |
# ifndef __cpp_lib_constexpr_memory |
| 469 |
# error "__cpp_lib_constexpr_memory should be defined in c++23" |
| 470 |
# endif |
| 471 |
# if __cpp_lib_constexpr_memory != 202202L |
| 472 |
# error "__cpp_lib_constexpr_memory should have the value 202202L in c++23" |
| 473 |
# endif |
| 474 |
|
| 475 |
# ifndef __cpp_lib_enable_shared_from_this |
| 476 |
# error "__cpp_lib_enable_shared_from_this should be defined in c++23" |
| 477 |
# endif |
| 478 |
# if __cpp_lib_enable_shared_from_this != 201603L |
| 479 |
# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++23" |
| 480 |
# endif |
| 481 |
|
| 482 |
# ifndef __cpp_lib_make_unique |
| 483 |
# error "__cpp_lib_make_unique should be defined in c++23" |
| 484 |
# endif |
| 485 |
# if __cpp_lib_make_unique != 201304L |
| 486 |
# error "__cpp_lib_make_unique should have the value 201304L in c++23" |
| 487 |
# endif |
| 488 |
|
| 489 |
# ifndef __cpp_lib_out_ptr |
| 490 |
# error "__cpp_lib_out_ptr should be defined in c++23" |
| 491 |
# endif |
| 492 |
# if __cpp_lib_out_ptr != 202106L |
| 493 |
# error "__cpp_lib_out_ptr should have the value 202106L in c++23" |
| 494 |
# endif |
| 495 |
|
| 496 |
# ifndef __cpp_lib_ranges |
| 497 |
# error "__cpp_lib_ranges should be defined in c++23" |
| 498 |
# endif |
| 499 |
# if __cpp_lib_ranges != 202211L |
| 500 |
# error "__cpp_lib_ranges should have the value 202211L in c++23" |
| 501 |
# endif |
| 502 |
|
| 503 |
# ifndef __cpp_lib_raw_memory_algorithms |
| 504 |
# error "__cpp_lib_raw_memory_algorithms should be defined in c++23" |
| 505 |
# endif |
| 506 |
# if __cpp_lib_raw_memory_algorithms != 201606L |
| 507 |
# error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++23" |
| 508 |
# endif |
| 509 |
|
| 510 |
# ifndef __cpp_lib_shared_ptr_arrays |
| 511 |
# error "__cpp_lib_shared_ptr_arrays should be defined in c++23" |
| 512 |
# endif |
| 513 |
# if __cpp_lib_shared_ptr_arrays != 201707L |
| 514 |
# error "__cpp_lib_shared_ptr_arrays should have the value 201707L in c++23" |
| 515 |
# endif |
| 516 |
|
| 517 |
# ifndef __cpp_lib_shared_ptr_weak_type |
| 518 |
# error "__cpp_lib_shared_ptr_weak_type should be defined in c++23" |
| 519 |
# endif |
| 520 |
# if __cpp_lib_shared_ptr_weak_type != 201606L |
| 521 |
# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++23" |
| 522 |
# endif |
| 523 |
|
| 524 |
# if !defined(_LIBCPP_VERSION) |
| 525 |
# ifndef __cpp_lib_smart_ptr_for_overwrite |
| 526 |
# error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++23" |
| 527 |
# endif |
| 528 |
# if __cpp_lib_smart_ptr_for_overwrite != 202002L |
| 529 |
# error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++23" |
| 530 |
# endif |
| 531 |
# else // _LIBCPP_VERSION |
| 532 |
# ifdef __cpp_lib_smart_ptr_for_overwrite |
| 533 |
# error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!" |
| 534 |
# endif |
| 535 |
# endif |
| 536 |
|
| 537 |
# ifdef __cpp_lib_smart_ptr_owner_equality |
| 538 |
# error "__cpp_lib_smart_ptr_owner_equality should not be defined before c++26" |
| 539 |
# endif |
| 540 |
|
| 541 |
# ifndef __cpp_lib_to_address |
| 542 |
# error "__cpp_lib_to_address should be defined in c++23" |
| 543 |
# endif |
| 544 |
# if __cpp_lib_to_address != 201711L |
| 545 |
# error "__cpp_lib_to_address should have the value 201711L in c++23" |
| 546 |
# endif |
| 547 |
|
| 548 |
# ifndef __cpp_lib_transparent_operators |
| 549 |
# error "__cpp_lib_transparent_operators should be defined in c++23" |
| 550 |
# endif |
| 551 |
# if __cpp_lib_transparent_operators != 201510L |
| 552 |
# error "__cpp_lib_transparent_operators should have the value 201510L in c++23" |
| 553 |
# endif |
| 554 |
|
| 555 |
#elif TEST_STD_VER > 23 |
| 556 |
|
| 557 |
# ifndef __cpp_lib_addressof_constexpr |
| 558 |
# error "__cpp_lib_addressof_constexpr should be defined in c++26" |
| 559 |
# endif |
| 560 |
# if __cpp_lib_addressof_constexpr != 201603L |
| 561 |
# error "__cpp_lib_addressof_constexpr should have the value 201603L in c++26" |
| 562 |
# endif |
| 563 |
|
| 564 |
# ifndef __cpp_lib_allocate_at_least |
| 565 |
# error "__cpp_lib_allocate_at_least should be defined in c++26" |
| 566 |
# endif |
| 567 |
# if __cpp_lib_allocate_at_least != 202302L |
| 568 |
# error "__cpp_lib_allocate_at_least should have the value 202302L in c++26" |
| 569 |
# endif |
| 570 |
|
| 571 |
# ifndef __cpp_lib_allocator_traits_is_always_equal |
| 572 |
# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26" |
| 573 |
# endif |
| 574 |
# if __cpp_lib_allocator_traits_is_always_equal != 201411L |
| 575 |
# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26" |
| 576 |
# endif |
| 577 |
|
| 578 |
# ifndef __cpp_lib_assume_aligned |
| 579 |
# error "__cpp_lib_assume_aligned should be defined in c++26" |
| 580 |
# endif |
| 581 |
# if __cpp_lib_assume_aligned != 201811L |
| 582 |
# error "__cpp_lib_assume_aligned should have the value 201811L in c++26" |
| 583 |
# endif |
| 584 |
|
| 585 |
# ifndef __cpp_lib_atomic_value_initialization |
| 586 |
# error "__cpp_lib_atomic_value_initialization should be defined in c++26" |
| 587 |
# endif |
| 588 |
# if __cpp_lib_atomic_value_initialization != 201911L |
| 589 |
# error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++26" |
| 590 |
# endif |
| 591 |
|
| 592 |
# ifndef __cpp_lib_constexpr_dynamic_alloc |
| 593 |
# error "__cpp_lib_constexpr_dynamic_alloc should be defined in c++26" |
| 594 |
# endif |
| 595 |
# if __cpp_lib_constexpr_dynamic_alloc != 201907L |
| 596 |
# error "__cpp_lib_constexpr_dynamic_alloc should have the value 201907L in c++26" |
| 597 |
# endif |
| 598 |
|
| 599 |
# ifndef __cpp_lib_constexpr_memory |
| 600 |
# error "__cpp_lib_constexpr_memory should be defined in c++26" |
| 601 |
# endif |
| 602 |
# if __cpp_lib_constexpr_memory != 202202L |
| 603 |
# error "__cpp_lib_constexpr_memory should have the value 202202L in c++26" |
| 604 |
# endif |
| 605 |
|
| 606 |
# ifndef __cpp_lib_enable_shared_from_this |
| 607 |
# error "__cpp_lib_enable_shared_from_this should be defined in c++26" |
| 608 |
# endif |
| 609 |
# if __cpp_lib_enable_shared_from_this != 201603L |
| 610 |
# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++26" |
| 611 |
# endif |
| 612 |
|
| 613 |
# ifndef __cpp_lib_make_unique |
| 614 |
# error "__cpp_lib_make_unique should be defined in c++26" |
| 615 |
# endif |
| 616 |
# if __cpp_lib_make_unique != 201304L |
| 617 |
# error "__cpp_lib_make_unique should have the value 201304L in c++26" |
| 618 |
# endif |
| 619 |
|
| 620 |
# ifndef __cpp_lib_out_ptr |
| 621 |
# error "__cpp_lib_out_ptr should be defined in c++26" |
| 622 |
# endif |
| 623 |
# if __cpp_lib_out_ptr != 202311L |
| 624 |
# error "__cpp_lib_out_ptr should have the value 202311L in c++26" |
| 625 |
# endif |
| 626 |
|
| 627 |
# ifndef __cpp_lib_ranges |
| 628 |
# error "__cpp_lib_ranges should be defined in c++26" |
| 629 |
# endif |
| 630 |
# if __cpp_lib_ranges != 202211L |
| 631 |
# error "__cpp_lib_ranges should have the value 202211L in c++26" |
| 632 |
# endif |
| 633 |
|
| 634 |
# ifndef __cpp_lib_raw_memory_algorithms |
| 635 |
# error "__cpp_lib_raw_memory_algorithms should be defined in c++26" |
| 636 |
# endif |
| 637 |
# if __cpp_lib_raw_memory_algorithms != 201606L |
| 638 |
# error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++26" |
| 639 |
# endif |
| 640 |
|
| 641 |
# ifndef __cpp_lib_shared_ptr_arrays |
| 642 |
# error "__cpp_lib_shared_ptr_arrays should be defined in c++26" |
| 643 |
# endif |
| 644 |
# if __cpp_lib_shared_ptr_arrays != 201707L |
| 645 |
# error "__cpp_lib_shared_ptr_arrays should have the value 201707L in c++26" |
| 646 |
# endif |
| 647 |
|
| 648 |
# ifndef __cpp_lib_shared_ptr_weak_type |
| 649 |
# error "__cpp_lib_shared_ptr_weak_type should be defined in c++26" |
| 650 |
# endif |
| 651 |
# if __cpp_lib_shared_ptr_weak_type != 201606L |
| 652 |
# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++26" |
| 653 |
# endif |
| 654 |
|
| 655 |
# if !defined(_LIBCPP_VERSION) |
| 656 |
# ifndef __cpp_lib_smart_ptr_for_overwrite |
| 657 |
# error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++26" |
| 658 |
# endif |
| 659 |
# if __cpp_lib_smart_ptr_for_overwrite != 202002L |
| 660 |
# error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++26" |
| 661 |
# endif |
| 662 |
# else // _LIBCPP_VERSION |
| 663 |
# ifdef __cpp_lib_smart_ptr_for_overwrite |
| 664 |
# error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!" |
| 665 |
# endif |
| 666 |
# endif |
| 667 |
|
| 668 |
# if !defined(_LIBCPP_VERSION) |
| 669 |
# ifndef __cpp_lib_smart_ptr_owner_equality |
| 670 |
# error "__cpp_lib_smart_ptr_owner_equality should be defined in c++26" |
| 671 |
# endif |
| 672 |
# if __cpp_lib_smart_ptr_owner_equality != 202306L |
| 673 |
# error "__cpp_lib_smart_ptr_owner_equality should have the value 202306L in c++26" |
| 674 |
# endif |
| 675 |
# else // _LIBCPP_VERSION |
| 676 |
# ifdef __cpp_lib_smart_ptr_owner_equality |
| 677 |
# error "__cpp_lib_smart_ptr_owner_equality should not be defined because it is unimplemented in libc++!" |
| 678 |
# endif |
| 679 |
# endif |
| 680 |
|
| 681 |
# ifndef __cpp_lib_to_address |
| 682 |
# error "__cpp_lib_to_address should be defined in c++26" |
| 683 |
# endif |
| 684 |
# if __cpp_lib_to_address != 201711L |
| 685 |
# error "__cpp_lib_to_address should have the value 201711L in c++26" |
| 686 |
# endif |
| 687 |
|
| 688 |
# ifndef __cpp_lib_transparent_operators |
| 689 |
# error "__cpp_lib_transparent_operators should be defined in c++26" |
| 690 |
# endif |
| 691 |
# if __cpp_lib_transparent_operators != 201510L |
| 692 |
# error "__cpp_lib_transparent_operators should have the value 201510L in c++26" |
| 693 |
# endif |
| 694 |
|
| 695 |
#endif // TEST_STD_VER > 23 |
| 696 |
|