brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 0382d93 Raw
80 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-filesystem13 14// <print>15 16// Test the feature test macros defined by <print>17 18// clang-format off19 20#include <print>21#include "test_macros.h"22 23#if TEST_STD_VER < 1424 25#  ifdef __cpp_lib_print26#    error "__cpp_lib_print should not be defined before c++23"27#  endif28 29#elif TEST_STD_VER == 1430 31#  ifdef __cpp_lib_print32#    error "__cpp_lib_print should not be defined before c++23"33#  endif34 35#elif TEST_STD_VER == 1736 37#  ifdef __cpp_lib_print38#    error "__cpp_lib_print should not be defined before c++23"39#  endif40 41#elif TEST_STD_VER == 2042 43#  ifdef __cpp_lib_print44#    error "__cpp_lib_print should not be defined before c++23"45#  endif46 47#elif TEST_STD_VER == 2348 49#  if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT50#    ifndef __cpp_lib_print51#      error "__cpp_lib_print should be defined in c++23"52#    endif53#    if __cpp_lib_print != 202207L54#      error "__cpp_lib_print should have the value 202207L in c++23"55#    endif56#  else57#    ifdef __cpp_lib_print58#      error "__cpp_lib_print should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' is not met!"59#    endif60#  endif61 62#elif TEST_STD_VER > 2363 64#  if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT65#    ifndef __cpp_lib_print66#      error "__cpp_lib_print should be defined in c++26"67#    endif68#    if __cpp_lib_print != 202207L69#      error "__cpp_lib_print should have the value 202207L in c++26"70#    endif71#  else72#    ifdef __cpp_lib_print73#      error "__cpp_lib_print should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' is not met!"74#    endif75#  endif76 77#endif // TEST_STD_VER > 2378 79// clang-format on80