12c6217f2SLouis Dionne //===----------------------------------------------------------------------===// 22c6217f2SLouis Dionne // 32c6217f2SLouis Dionne // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42c6217f2SLouis Dionne // See https://llvm.org/LICENSE.txt for license information. 52c6217f2SLouis Dionne // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 62c6217f2SLouis Dionne // 72c6217f2SLouis Dionne //===----------------------------------------------------------------------===// 82c6217f2SLouis Dionne // 92c6217f2SLouis Dionne // WARNING: This test was generated by generate_feature_test_macro_components.py 102c6217f2SLouis Dionne // and should not be edited manually. 112c6217f2SLouis Dionne // 122c6217f2SLouis Dionne // clang-format off 132c6217f2SLouis Dionne 142c6217f2SLouis Dionne // <atomic> 152c6217f2SLouis Dionne 162c6217f2SLouis Dionne // Test the feature test macros defined by <atomic> 172c6217f2SLouis Dionne 182c6217f2SLouis Dionne /* Constant Value 192c6217f2SLouis Dionne __cpp_lib_atomic_flag_test 201907L [C++20] 202c6217f2SLouis Dionne __cpp_lib_atomic_float 201711L [C++20] 212c6217f2SLouis Dionne __cpp_lib_atomic_is_always_lock_free 201603L [C++17] 222c6217f2SLouis Dionne __cpp_lib_atomic_lock_free_type_aliases 201907L [C++20] 23*b699a9baSLouis Dionne __cpp_lib_atomic_min_max 202403L [C++26] 242c6217f2SLouis Dionne __cpp_lib_atomic_ref 201806L [C++20] 252c6217f2SLouis Dionne __cpp_lib_atomic_shared_ptr 201711L [C++20] 262c6217f2SLouis Dionne __cpp_lib_atomic_value_initialization 201911L [C++20] 272c6217f2SLouis Dionne __cpp_lib_atomic_wait 201907L [C++20] 28309aed30SNikolas Klauser __cpp_lib_char8_t 201907L [C++20] 292c6217f2SLouis Dionne */ 302c6217f2SLouis Dionne 312c6217f2SLouis Dionne #include <atomic> 322c6217f2SLouis Dionne #include "test_macros.h" 332c6217f2SLouis Dionne 342c6217f2SLouis Dionne #if TEST_STD_VER < 14 352c6217f2SLouis Dionne 362c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_flag_test 372c6217f2SLouis Dionne # error "__cpp_lib_atomic_flag_test should not be defined before c++20" 382c6217f2SLouis Dionne # endif 392c6217f2SLouis Dionne 402c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_float 412c6217f2SLouis Dionne # error "__cpp_lib_atomic_float should not be defined before c++20" 422c6217f2SLouis Dionne # endif 432c6217f2SLouis Dionne 442c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_is_always_lock_free 452c6217f2SLouis Dionne # error "__cpp_lib_atomic_is_always_lock_free should not be defined before c++17" 462c6217f2SLouis Dionne # endif 472c6217f2SLouis Dionne 482c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_lock_free_type_aliases 492c6217f2SLouis Dionne # error "__cpp_lib_atomic_lock_free_type_aliases should not be defined before c++20" 502c6217f2SLouis Dionne # endif 512c6217f2SLouis Dionne 52*b699a9baSLouis Dionne # ifdef __cpp_lib_atomic_min_max 53*b699a9baSLouis Dionne # error "__cpp_lib_atomic_min_max should not be defined before c++26" 54*b699a9baSLouis Dionne # endif 55*b699a9baSLouis Dionne 562c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_ref 572c6217f2SLouis Dionne # error "__cpp_lib_atomic_ref should not be defined before c++20" 582c6217f2SLouis Dionne # endif 592c6217f2SLouis Dionne 602c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_shared_ptr 612c6217f2SLouis Dionne # error "__cpp_lib_atomic_shared_ptr should not be defined before c++20" 622c6217f2SLouis Dionne # endif 632c6217f2SLouis Dionne 642c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_value_initialization 652c6217f2SLouis Dionne # error "__cpp_lib_atomic_value_initialization should not be defined before c++20" 662c6217f2SLouis Dionne # endif 672c6217f2SLouis Dionne 682c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_wait 692c6217f2SLouis Dionne # error "__cpp_lib_atomic_wait should not be defined before c++20" 702c6217f2SLouis Dionne # endif 712c6217f2SLouis Dionne 722c6217f2SLouis Dionne # ifdef __cpp_lib_char8_t 732c6217f2SLouis Dionne # error "__cpp_lib_char8_t should not be defined before c++20" 742c6217f2SLouis Dionne # endif 752c6217f2SLouis Dionne 762c6217f2SLouis Dionne #elif TEST_STD_VER == 14 772c6217f2SLouis Dionne 782c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_flag_test 792c6217f2SLouis Dionne # error "__cpp_lib_atomic_flag_test should not be defined before c++20" 802c6217f2SLouis Dionne # endif 812c6217f2SLouis Dionne 822c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_float 832c6217f2SLouis Dionne # error "__cpp_lib_atomic_float should not be defined before c++20" 842c6217f2SLouis Dionne # endif 852c6217f2SLouis Dionne 862c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_is_always_lock_free 872c6217f2SLouis Dionne # error "__cpp_lib_atomic_is_always_lock_free should not be defined before c++17" 882c6217f2SLouis Dionne # endif 892c6217f2SLouis Dionne 902c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_lock_free_type_aliases 912c6217f2SLouis Dionne # error "__cpp_lib_atomic_lock_free_type_aliases should not be defined before c++20" 922c6217f2SLouis Dionne # endif 932c6217f2SLouis Dionne 94*b699a9baSLouis Dionne # ifdef __cpp_lib_atomic_min_max 95*b699a9baSLouis Dionne # error "__cpp_lib_atomic_min_max should not be defined before c++26" 96*b699a9baSLouis Dionne # endif 97*b699a9baSLouis Dionne 982c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_ref 992c6217f2SLouis Dionne # error "__cpp_lib_atomic_ref should not be defined before c++20" 1002c6217f2SLouis Dionne # endif 1012c6217f2SLouis Dionne 1022c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_shared_ptr 1032c6217f2SLouis Dionne # error "__cpp_lib_atomic_shared_ptr should not be defined before c++20" 1042c6217f2SLouis Dionne # endif 1052c6217f2SLouis Dionne 1062c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_value_initialization 1072c6217f2SLouis Dionne # error "__cpp_lib_atomic_value_initialization should not be defined before c++20" 1082c6217f2SLouis Dionne # endif 1092c6217f2SLouis Dionne 1102c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_wait 1112c6217f2SLouis Dionne # error "__cpp_lib_atomic_wait should not be defined before c++20" 1122c6217f2SLouis Dionne # endif 1132c6217f2SLouis Dionne 1142c6217f2SLouis Dionne # ifdef __cpp_lib_char8_t 1152c6217f2SLouis Dionne # error "__cpp_lib_char8_t should not be defined before c++20" 1162c6217f2SLouis Dionne # endif 1172c6217f2SLouis Dionne 1182c6217f2SLouis Dionne #elif TEST_STD_VER == 17 1192c6217f2SLouis Dionne 1202c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_flag_test 1212c6217f2SLouis Dionne # error "__cpp_lib_atomic_flag_test should not be defined before c++20" 1222c6217f2SLouis Dionne # endif 1232c6217f2SLouis Dionne 1242c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_float 1252c6217f2SLouis Dionne # error "__cpp_lib_atomic_float should not be defined before c++20" 1262c6217f2SLouis Dionne # endif 1272c6217f2SLouis Dionne 1282c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_is_always_lock_free 1292c6217f2SLouis Dionne # error "__cpp_lib_atomic_is_always_lock_free should be defined in c++17" 1302c6217f2SLouis Dionne # endif 1312c6217f2SLouis Dionne # if __cpp_lib_atomic_is_always_lock_free != 201603L 1322c6217f2SLouis Dionne # error "__cpp_lib_atomic_is_always_lock_free should have the value 201603L in c++17" 1332c6217f2SLouis Dionne # endif 1342c6217f2SLouis Dionne 1352c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_lock_free_type_aliases 1362c6217f2SLouis Dionne # error "__cpp_lib_atomic_lock_free_type_aliases should not be defined before c++20" 1372c6217f2SLouis Dionne # endif 1382c6217f2SLouis Dionne 139*b699a9baSLouis Dionne # ifdef __cpp_lib_atomic_min_max 140*b699a9baSLouis Dionne # error "__cpp_lib_atomic_min_max should not be defined before c++26" 141*b699a9baSLouis Dionne # endif 142*b699a9baSLouis Dionne 1432c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_ref 1442c6217f2SLouis Dionne # error "__cpp_lib_atomic_ref should not be defined before c++20" 1452c6217f2SLouis Dionne # endif 1462c6217f2SLouis Dionne 1472c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_shared_ptr 1482c6217f2SLouis Dionne # error "__cpp_lib_atomic_shared_ptr should not be defined before c++20" 1492c6217f2SLouis Dionne # endif 1502c6217f2SLouis Dionne 1512c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_value_initialization 1522c6217f2SLouis Dionne # error "__cpp_lib_atomic_value_initialization should not be defined before c++20" 1532c6217f2SLouis Dionne # endif 1542c6217f2SLouis Dionne 1552c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_wait 1562c6217f2SLouis Dionne # error "__cpp_lib_atomic_wait should not be defined before c++20" 1572c6217f2SLouis Dionne # endif 1582c6217f2SLouis Dionne 1592c6217f2SLouis Dionne # ifdef __cpp_lib_char8_t 1602c6217f2SLouis Dionne # error "__cpp_lib_char8_t should not be defined before c++20" 1612c6217f2SLouis Dionne # endif 1622c6217f2SLouis Dionne 1632c6217f2SLouis Dionne #elif TEST_STD_VER == 20 1642c6217f2SLouis Dionne 1652c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_flag_test 1662c6217f2SLouis Dionne # error "__cpp_lib_atomic_flag_test should be defined in c++20" 1672c6217f2SLouis Dionne # endif 1682c6217f2SLouis Dionne # if __cpp_lib_atomic_flag_test != 201907L 1692c6217f2SLouis Dionne # error "__cpp_lib_atomic_flag_test should have the value 201907L in c++20" 1702c6217f2SLouis Dionne # endif 1712c6217f2SLouis Dionne 1722c6217f2SLouis Dionne # if !defined(_LIBCPP_VERSION) 1732c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_float 1742c6217f2SLouis Dionne # error "__cpp_lib_atomic_float should be defined in c++20" 1752c6217f2SLouis Dionne # endif 1762c6217f2SLouis Dionne # if __cpp_lib_atomic_float != 201711L 1772c6217f2SLouis Dionne # error "__cpp_lib_atomic_float should have the value 201711L in c++20" 1782c6217f2SLouis Dionne # endif 1792c6217f2SLouis Dionne # else // _LIBCPP_VERSION 1802c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_float 1812c6217f2SLouis Dionne # error "__cpp_lib_atomic_float should not be defined because it is unimplemented in libc++!" 1822c6217f2SLouis Dionne # endif 1832c6217f2SLouis Dionne # endif 1842c6217f2SLouis Dionne 1852c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_is_always_lock_free 1862c6217f2SLouis Dionne # error "__cpp_lib_atomic_is_always_lock_free should be defined in c++20" 1872c6217f2SLouis Dionne # endif 1882c6217f2SLouis Dionne # if __cpp_lib_atomic_is_always_lock_free != 201603L 1892c6217f2SLouis Dionne # error "__cpp_lib_atomic_is_always_lock_free should have the value 201603L in c++20" 1902c6217f2SLouis Dionne # endif 1912c6217f2SLouis Dionne 1922c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_lock_free_type_aliases 1932c6217f2SLouis Dionne # error "__cpp_lib_atomic_lock_free_type_aliases should be defined in c++20" 1942c6217f2SLouis Dionne # endif 1952c6217f2SLouis Dionne # if __cpp_lib_atomic_lock_free_type_aliases != 201907L 1962c6217f2SLouis Dionne # error "__cpp_lib_atomic_lock_free_type_aliases should have the value 201907L in c++20" 1972c6217f2SLouis Dionne # endif 1982c6217f2SLouis Dionne 199*b699a9baSLouis Dionne # ifdef __cpp_lib_atomic_min_max 200*b699a9baSLouis Dionne # error "__cpp_lib_atomic_min_max should not be defined before c++26" 201*b699a9baSLouis Dionne # endif 202*b699a9baSLouis Dionne 2032c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_ref 2042c6217f2SLouis Dionne # error "__cpp_lib_atomic_ref should be defined in c++20" 2052c6217f2SLouis Dionne # endif 2062c6217f2SLouis Dionne # if __cpp_lib_atomic_ref != 201806L 2072c6217f2SLouis Dionne # error "__cpp_lib_atomic_ref should have the value 201806L in c++20" 2082c6217f2SLouis Dionne # endif 2092c6217f2SLouis Dionne 2102c6217f2SLouis Dionne # if !defined(_LIBCPP_VERSION) 2112c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_shared_ptr 2122c6217f2SLouis Dionne # error "__cpp_lib_atomic_shared_ptr should be defined in c++20" 2132c6217f2SLouis Dionne # endif 2142c6217f2SLouis Dionne # if __cpp_lib_atomic_shared_ptr != 201711L 2152c6217f2SLouis Dionne # error "__cpp_lib_atomic_shared_ptr should have the value 201711L in c++20" 2162c6217f2SLouis Dionne # endif 2172c6217f2SLouis Dionne # else // _LIBCPP_VERSION 2182c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_shared_ptr 2192c6217f2SLouis Dionne # error "__cpp_lib_atomic_shared_ptr should not be defined because it is unimplemented in libc++!" 2202c6217f2SLouis Dionne # endif 2212c6217f2SLouis Dionne # endif 2222c6217f2SLouis Dionne 2232c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_value_initialization 2242c6217f2SLouis Dionne # error "__cpp_lib_atomic_value_initialization should be defined in c++20" 2252c6217f2SLouis Dionne # endif 2262c6217f2SLouis Dionne # if __cpp_lib_atomic_value_initialization != 201911L 2272c6217f2SLouis Dionne # error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++20" 2282c6217f2SLouis Dionne # endif 2292c6217f2SLouis Dionne 23012563ea6Sphilnik777 # if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_SYNC 2312c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_wait 2322c6217f2SLouis Dionne # error "__cpp_lib_atomic_wait should be defined in c++20" 2332c6217f2SLouis Dionne # endif 2342c6217f2SLouis Dionne # if __cpp_lib_atomic_wait != 201907L 2352c6217f2SLouis Dionne # error "__cpp_lib_atomic_wait should have the value 201907L in c++20" 2362c6217f2SLouis Dionne # endif 2372c6217f2SLouis Dionne # else 2382c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_wait 23912563ea6Sphilnik777 # error "__cpp_lib_atomic_wait should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_SYNC' is not met!" 2402c6217f2SLouis Dionne # endif 2412c6217f2SLouis Dionne # endif 2422c6217f2SLouis Dionne 2432c6217f2SLouis Dionne # if defined(__cpp_char8_t) 2442c6217f2SLouis Dionne # ifndef __cpp_lib_char8_t 2452c6217f2SLouis Dionne # error "__cpp_lib_char8_t should be defined in c++20" 2462c6217f2SLouis Dionne # endif 247309aed30SNikolas Klauser # if __cpp_lib_char8_t != 201907L 248309aed30SNikolas Klauser # error "__cpp_lib_char8_t should have the value 201907L in c++20" 2492c6217f2SLouis Dionne # endif 2502c6217f2SLouis Dionne # else 2512c6217f2SLouis Dionne # ifdef __cpp_lib_char8_t 252a72f6b03SMark de Wever # error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!" 2532c6217f2SLouis Dionne # endif 2542c6217f2SLouis Dionne # endif 2552c6217f2SLouis Dionne 25600c97cbcSMark de Wever #elif TEST_STD_VER == 23 2572c6217f2SLouis Dionne 2582c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_flag_test 25971400505SMark de Wever # error "__cpp_lib_atomic_flag_test should be defined in c++23" 2602c6217f2SLouis Dionne # endif 2612c6217f2SLouis Dionne # if __cpp_lib_atomic_flag_test != 201907L 26271400505SMark de Wever # error "__cpp_lib_atomic_flag_test should have the value 201907L in c++23" 2632c6217f2SLouis Dionne # endif 2642c6217f2SLouis Dionne 2652c6217f2SLouis Dionne # if !defined(_LIBCPP_VERSION) 2662c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_float 26771400505SMark de Wever # error "__cpp_lib_atomic_float should be defined in c++23" 2682c6217f2SLouis Dionne # endif 2692c6217f2SLouis Dionne # if __cpp_lib_atomic_float != 201711L 27071400505SMark de Wever # error "__cpp_lib_atomic_float should have the value 201711L in c++23" 2712c6217f2SLouis Dionne # endif 2722c6217f2SLouis Dionne # else // _LIBCPP_VERSION 2732c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_float 2742c6217f2SLouis Dionne # error "__cpp_lib_atomic_float should not be defined because it is unimplemented in libc++!" 2752c6217f2SLouis Dionne # endif 2762c6217f2SLouis Dionne # endif 2772c6217f2SLouis Dionne 2782c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_is_always_lock_free 27971400505SMark de Wever # error "__cpp_lib_atomic_is_always_lock_free should be defined in c++23" 2802c6217f2SLouis Dionne # endif 2812c6217f2SLouis Dionne # if __cpp_lib_atomic_is_always_lock_free != 201603L 28271400505SMark de Wever # error "__cpp_lib_atomic_is_always_lock_free should have the value 201603L in c++23" 2832c6217f2SLouis Dionne # endif 2842c6217f2SLouis Dionne 2852c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_lock_free_type_aliases 28671400505SMark de Wever # error "__cpp_lib_atomic_lock_free_type_aliases should be defined in c++23" 2872c6217f2SLouis Dionne # endif 2882c6217f2SLouis Dionne # if __cpp_lib_atomic_lock_free_type_aliases != 201907L 28971400505SMark de Wever # error "__cpp_lib_atomic_lock_free_type_aliases should have the value 201907L in c++23" 2902c6217f2SLouis Dionne # endif 2912c6217f2SLouis Dionne 292*b699a9baSLouis Dionne # ifdef __cpp_lib_atomic_min_max 293*b699a9baSLouis Dionne # error "__cpp_lib_atomic_min_max should not be defined before c++26" 294*b699a9baSLouis Dionne # endif 295*b699a9baSLouis Dionne 2962c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_ref 29771400505SMark de Wever # error "__cpp_lib_atomic_ref should be defined in c++23" 2982c6217f2SLouis Dionne # endif 2992c6217f2SLouis Dionne # if __cpp_lib_atomic_ref != 201806L 30071400505SMark de Wever # error "__cpp_lib_atomic_ref should have the value 201806L in c++23" 3012c6217f2SLouis Dionne # endif 3022c6217f2SLouis Dionne 3032c6217f2SLouis Dionne # if !defined(_LIBCPP_VERSION) 3042c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_shared_ptr 30571400505SMark de Wever # error "__cpp_lib_atomic_shared_ptr should be defined in c++23" 3062c6217f2SLouis Dionne # endif 3072c6217f2SLouis Dionne # if __cpp_lib_atomic_shared_ptr != 201711L 30871400505SMark de Wever # error "__cpp_lib_atomic_shared_ptr should have the value 201711L in c++23" 3092c6217f2SLouis Dionne # endif 3102c6217f2SLouis Dionne # else // _LIBCPP_VERSION 3112c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_shared_ptr 3122c6217f2SLouis Dionne # error "__cpp_lib_atomic_shared_ptr should not be defined because it is unimplemented in libc++!" 3132c6217f2SLouis Dionne # endif 3142c6217f2SLouis Dionne # endif 3152c6217f2SLouis Dionne 3162c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_value_initialization 31771400505SMark de Wever # error "__cpp_lib_atomic_value_initialization should be defined in c++23" 3182c6217f2SLouis Dionne # endif 3192c6217f2SLouis Dionne # if __cpp_lib_atomic_value_initialization != 201911L 32071400505SMark de Wever # error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++23" 3212c6217f2SLouis Dionne # endif 3222c6217f2SLouis Dionne 32312563ea6Sphilnik777 # if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_SYNC 3242c6217f2SLouis Dionne # ifndef __cpp_lib_atomic_wait 32571400505SMark de Wever # error "__cpp_lib_atomic_wait should be defined in c++23" 3262c6217f2SLouis Dionne # endif 3272c6217f2SLouis Dionne # if __cpp_lib_atomic_wait != 201907L 32871400505SMark de Wever # error "__cpp_lib_atomic_wait should have the value 201907L in c++23" 3292c6217f2SLouis Dionne # endif 3302c6217f2SLouis Dionne # else 3312c6217f2SLouis Dionne # ifdef __cpp_lib_atomic_wait 33212563ea6Sphilnik777 # error "__cpp_lib_atomic_wait should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_SYNC' is not met!" 3332c6217f2SLouis Dionne # endif 3342c6217f2SLouis Dionne # endif 3352c6217f2SLouis Dionne 3362c6217f2SLouis Dionne # if defined(__cpp_char8_t) 3372c6217f2SLouis Dionne # ifndef __cpp_lib_char8_t 33871400505SMark de Wever # error "__cpp_lib_char8_t should be defined in c++23" 3392c6217f2SLouis Dionne # endif 340309aed30SNikolas Klauser # if __cpp_lib_char8_t != 201907L 34171400505SMark de Wever # error "__cpp_lib_char8_t should have the value 201907L in c++23" 3422c6217f2SLouis Dionne # endif 3432c6217f2SLouis Dionne # else 3442c6217f2SLouis Dionne # ifdef __cpp_lib_char8_t 345a72f6b03SMark de Wever # error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!" 3462c6217f2SLouis Dionne # endif 3472c6217f2SLouis Dionne # endif 3482c6217f2SLouis Dionne 34900c97cbcSMark de Wever #elif TEST_STD_VER > 23 35000c97cbcSMark de Wever 35100c97cbcSMark de Wever # ifndef __cpp_lib_atomic_flag_test 35200c97cbcSMark de Wever # error "__cpp_lib_atomic_flag_test should be defined in c++26" 35300c97cbcSMark de Wever # endif 35400c97cbcSMark de Wever # if __cpp_lib_atomic_flag_test != 201907L 35500c97cbcSMark de Wever # error "__cpp_lib_atomic_flag_test should have the value 201907L in c++26" 35600c97cbcSMark de Wever # endif 35700c97cbcSMark de Wever 35800c97cbcSMark de Wever # if !defined(_LIBCPP_VERSION) 35900c97cbcSMark de Wever # ifndef __cpp_lib_atomic_float 36000c97cbcSMark de Wever # error "__cpp_lib_atomic_float should be defined in c++26" 36100c97cbcSMark de Wever # endif 36200c97cbcSMark de Wever # if __cpp_lib_atomic_float != 201711L 36300c97cbcSMark de Wever # error "__cpp_lib_atomic_float should have the value 201711L in c++26" 36400c97cbcSMark de Wever # endif 36500c97cbcSMark de Wever # else // _LIBCPP_VERSION 36600c97cbcSMark de Wever # ifdef __cpp_lib_atomic_float 36700c97cbcSMark de Wever # error "__cpp_lib_atomic_float should not be defined because it is unimplemented in libc++!" 36800c97cbcSMark de Wever # endif 36900c97cbcSMark de Wever # endif 37000c97cbcSMark de Wever 37100c97cbcSMark de Wever # ifndef __cpp_lib_atomic_is_always_lock_free 37200c97cbcSMark de Wever # error "__cpp_lib_atomic_is_always_lock_free should be defined in c++26" 37300c97cbcSMark de Wever # endif 37400c97cbcSMark de Wever # if __cpp_lib_atomic_is_always_lock_free != 201603L 37500c97cbcSMark de Wever # error "__cpp_lib_atomic_is_always_lock_free should have the value 201603L in c++26" 37600c97cbcSMark de Wever # endif 37700c97cbcSMark de Wever 37800c97cbcSMark de Wever # ifndef __cpp_lib_atomic_lock_free_type_aliases 37900c97cbcSMark de Wever # error "__cpp_lib_atomic_lock_free_type_aliases should be defined in c++26" 38000c97cbcSMark de Wever # endif 38100c97cbcSMark de Wever # if __cpp_lib_atomic_lock_free_type_aliases != 201907L 38200c97cbcSMark de Wever # error "__cpp_lib_atomic_lock_free_type_aliases should have the value 201907L in c++26" 38300c97cbcSMark de Wever # endif 38400c97cbcSMark de Wever 38500c97cbcSMark de Wever # if !defined(_LIBCPP_VERSION) 386*b699a9baSLouis Dionne # ifndef __cpp_lib_atomic_min_max 387*b699a9baSLouis Dionne # error "__cpp_lib_atomic_min_max should be defined in c++26" 388*b699a9baSLouis Dionne # endif 389*b699a9baSLouis Dionne # if __cpp_lib_atomic_min_max != 202403L 390*b699a9baSLouis Dionne # error "__cpp_lib_atomic_min_max should have the value 202403L in c++26" 391*b699a9baSLouis Dionne # endif 392*b699a9baSLouis Dionne # else // _LIBCPP_VERSION 393*b699a9baSLouis Dionne # ifdef __cpp_lib_atomic_min_max 394*b699a9baSLouis Dionne # error "__cpp_lib_atomic_min_max should not be defined because it is unimplemented in libc++!" 395*b699a9baSLouis Dionne # endif 396*b699a9baSLouis Dionne # endif 397*b699a9baSLouis Dionne 39800c97cbcSMark de Wever # ifndef __cpp_lib_atomic_ref 39900c97cbcSMark de Wever # error "__cpp_lib_atomic_ref should be defined in c++26" 40000c97cbcSMark de Wever # endif 40100c97cbcSMark de Wever # if __cpp_lib_atomic_ref != 201806L 40200c97cbcSMark de Wever # error "__cpp_lib_atomic_ref should have the value 201806L in c++26" 40300c97cbcSMark de Wever # endif 40400c97cbcSMark de Wever 40500c97cbcSMark de Wever # if !defined(_LIBCPP_VERSION) 40600c97cbcSMark de Wever # ifndef __cpp_lib_atomic_shared_ptr 40700c97cbcSMark de Wever # error "__cpp_lib_atomic_shared_ptr should be defined in c++26" 40800c97cbcSMark de Wever # endif 40900c97cbcSMark de Wever # if __cpp_lib_atomic_shared_ptr != 201711L 41000c97cbcSMark de Wever # error "__cpp_lib_atomic_shared_ptr should have the value 201711L in c++26" 41100c97cbcSMark de Wever # endif 41200c97cbcSMark de Wever # else // _LIBCPP_VERSION 41300c97cbcSMark de Wever # ifdef __cpp_lib_atomic_shared_ptr 41400c97cbcSMark de Wever # error "__cpp_lib_atomic_shared_ptr should not be defined because it is unimplemented in libc++!" 41500c97cbcSMark de Wever # endif 41600c97cbcSMark de Wever # endif 41700c97cbcSMark de Wever 41800c97cbcSMark de Wever # ifndef __cpp_lib_atomic_value_initialization 41900c97cbcSMark de Wever # error "__cpp_lib_atomic_value_initialization should be defined in c++26" 42000c97cbcSMark de Wever # endif 42100c97cbcSMark de Wever # if __cpp_lib_atomic_value_initialization != 201911L 42200c97cbcSMark de Wever # error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++26" 42300c97cbcSMark de Wever # endif 42400c97cbcSMark de Wever 42512563ea6Sphilnik777 # if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_SYNC 42600c97cbcSMark de Wever # ifndef __cpp_lib_atomic_wait 42700c97cbcSMark de Wever # error "__cpp_lib_atomic_wait should be defined in c++26" 42800c97cbcSMark de Wever # endif 42900c97cbcSMark de Wever # if __cpp_lib_atomic_wait != 201907L 43000c97cbcSMark de Wever # error "__cpp_lib_atomic_wait should have the value 201907L in c++26" 43100c97cbcSMark de Wever # endif 43200c97cbcSMark de Wever # else 43300c97cbcSMark de Wever # ifdef __cpp_lib_atomic_wait 43412563ea6Sphilnik777 # error "__cpp_lib_atomic_wait should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_SYNC' is not met!" 43500c97cbcSMark de Wever # endif 43600c97cbcSMark de Wever # endif 43700c97cbcSMark de Wever 43800c97cbcSMark de Wever # if defined(__cpp_char8_t) 43900c97cbcSMark de Wever # ifndef __cpp_lib_char8_t 44000c97cbcSMark de Wever # error "__cpp_lib_char8_t should be defined in c++26" 44100c97cbcSMark de Wever # endif 44200c97cbcSMark de Wever # if __cpp_lib_char8_t != 201907L 44300c97cbcSMark de Wever # error "__cpp_lib_char8_t should have the value 201907L in c++26" 44400c97cbcSMark de Wever # endif 44500c97cbcSMark de Wever # else 44600c97cbcSMark de Wever # ifdef __cpp_lib_char8_t 44700c97cbcSMark de Wever # error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!" 44800c97cbcSMark de Wever # endif 44900c97cbcSMark de Wever # endif 45000c97cbcSMark de Wever 45100c97cbcSMark de Wever #endif // TEST_STD_VER > 23 4522c6217f2SLouis Dionne 453