brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · 6ec3037 Raw
126 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// <charconv>13 14// Test the feature test macros defined by <charconv>15 16// clang-format off17 18#include <charconv>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23#  ifdef __cpp_lib_constexpr_charconv24#    error "__cpp_lib_constexpr_charconv should not be defined before c++23"25#  endif26 27#  ifdef __cpp_lib_to_chars28#    error "__cpp_lib_to_chars should not be defined before c++17"29#  endif30 31#elif TEST_STD_VER == 1432 33#  ifdef __cpp_lib_constexpr_charconv34#    error "__cpp_lib_constexpr_charconv should not be defined before c++23"35#  endif36 37#  ifdef __cpp_lib_to_chars38#    error "__cpp_lib_to_chars should not be defined before c++17"39#  endif40 41#elif TEST_STD_VER == 1742 43#  ifdef __cpp_lib_constexpr_charconv44#    error "__cpp_lib_constexpr_charconv should not be defined before c++23"45#  endif46 47#  if !defined(_LIBCPP_VERSION)48#    ifndef __cpp_lib_to_chars49#      error "__cpp_lib_to_chars should be defined in c++17"50#    endif51#    if __cpp_lib_to_chars != 201611L52#      error "__cpp_lib_to_chars should have the value 201611L in c++17"53#    endif54#  else55#    ifdef __cpp_lib_to_chars56#      error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"57#    endif58#  endif59 60#elif TEST_STD_VER == 2061 62#  ifdef __cpp_lib_constexpr_charconv63#    error "__cpp_lib_constexpr_charconv should not be defined before c++23"64#  endif65 66#  if !defined(_LIBCPP_VERSION)67#    ifndef __cpp_lib_to_chars68#      error "__cpp_lib_to_chars should be defined in c++20"69#    endif70#    if __cpp_lib_to_chars != 201611L71#      error "__cpp_lib_to_chars should have the value 201611L in c++20"72#    endif73#  else74#    ifdef __cpp_lib_to_chars75#      error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"76#    endif77#  endif78 79#elif TEST_STD_VER == 2380 81#  ifndef __cpp_lib_constexpr_charconv82#    error "__cpp_lib_constexpr_charconv should be defined in c++23"83#  endif84#  if __cpp_lib_constexpr_charconv != 202207L85#    error "__cpp_lib_constexpr_charconv should have the value 202207L in c++23"86#  endif87 88#  if !defined(_LIBCPP_VERSION)89#    ifndef __cpp_lib_to_chars90#      error "__cpp_lib_to_chars should be defined in c++23"91#    endif92#    if __cpp_lib_to_chars != 201611L93#      error "__cpp_lib_to_chars should have the value 201611L in c++23"94#    endif95#  else96#    ifdef __cpp_lib_to_chars97#      error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"98#    endif99#  endif100 101#elif TEST_STD_VER > 23102 103#  ifndef __cpp_lib_constexpr_charconv104#    error "__cpp_lib_constexpr_charconv should be defined in c++26"105#  endif106#  if __cpp_lib_constexpr_charconv != 202207L107#    error "__cpp_lib_constexpr_charconv should have the value 202207L in c++26"108#  endif109 110#  if !defined(_LIBCPP_VERSION)111#    ifndef __cpp_lib_to_chars112#      error "__cpp_lib_to_chars should be defined in c++26"113#    endif114#    if __cpp_lib_to_chars != 202306L115#      error "__cpp_lib_to_chars should have the value 202306L in c++26"116#    endif117#  else118#    ifdef __cpp_lib_to_chars119#      error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"120#    endif121#  endif122 123#endif // TEST_STD_VER > 23124 125// clang-format on126