brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · c07d935 Raw
68 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// WARNING: This test was generated by generate_feature_test_macro_components.py10// and should not be edited manually.11 12// UNSUPPORTED: no-threads13 14// <stdatomic.h>15 16// Test the feature test macros defined by <stdatomic.h>17 18// clang-format off19 20#include <stdatomic.h>21#include "test_macros.h"22 23#if TEST_STD_VER < 1424 25#  ifdef __cpp_lib_stdatomic_h26#    error "__cpp_lib_stdatomic_h should not be defined before c++23"27#  endif28 29#elif TEST_STD_VER == 1430 31#  ifdef __cpp_lib_stdatomic_h32#    error "__cpp_lib_stdatomic_h should not be defined before c++23"33#  endif34 35#elif TEST_STD_VER == 1736 37#  ifdef __cpp_lib_stdatomic_h38#    error "__cpp_lib_stdatomic_h should not be defined before c++23"39#  endif40 41#elif TEST_STD_VER == 2042 43#  ifdef __cpp_lib_stdatomic_h44#    error "__cpp_lib_stdatomic_h should not be defined before c++23"45#  endif46 47#elif TEST_STD_VER == 2348 49#  ifndef __cpp_lib_stdatomic_h50#    error "__cpp_lib_stdatomic_h should be defined in c++23"51#  endif52#  if __cpp_lib_stdatomic_h != 202011L53#    error "__cpp_lib_stdatomic_h should have the value 202011L in c++23"54#  endif55 56#elif TEST_STD_VER > 2357 58#  ifndef __cpp_lib_stdatomic_h59#    error "__cpp_lib_stdatomic_h should be defined in c++26"60#  endif61#  if __cpp_lib_stdatomic_h != 202011L62#    error "__cpp_lib_stdatomic_h should have the value 202011L in c++26"63#  endif64 65#endif // TEST_STD_VER > 2366 67// clang-format on68