brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · f516881 Raw
89 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-localization13 14// <locale>15 16// Test the feature test macros defined by <locale>17 18// clang-format off19 20#include <locale>21#include "test_macros.h"22 23#if TEST_STD_VER < 1424 25#  ifdef __cpp_lib_char8_t26#    error "__cpp_lib_char8_t should not be defined before c++20"27#  endif28 29#elif TEST_STD_VER == 1430 31#  ifdef __cpp_lib_char8_t32#    error "__cpp_lib_char8_t should not be defined before c++20"33#  endif34 35#elif TEST_STD_VER == 1736 37#  ifdef __cpp_lib_char8_t38#    error "__cpp_lib_char8_t should not be defined before c++20"39#  endif40 41#elif TEST_STD_VER == 2042 43#  if defined(__cpp_char8_t)44#    ifndef __cpp_lib_char8_t45#      error "__cpp_lib_char8_t should be defined in c++20"46#    endif47#    if __cpp_lib_char8_t != 201907L48#      error "__cpp_lib_char8_t should have the value 201907L in c++20"49#    endif50#  else51#    ifdef __cpp_lib_char8_t52#      error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!"53#    endif54#  endif55 56#elif TEST_STD_VER == 2357 58#  if defined(__cpp_char8_t)59#    ifndef __cpp_lib_char8_t60#      error "__cpp_lib_char8_t should be defined in c++23"61#    endif62#    if __cpp_lib_char8_t != 201907L63#      error "__cpp_lib_char8_t should have the value 201907L in c++23"64#    endif65#  else66#    ifdef __cpp_lib_char8_t67#      error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!"68#    endif69#  endif70 71#elif TEST_STD_VER > 2372 73#  if defined(__cpp_char8_t)74#    ifndef __cpp_lib_char8_t75#      error "__cpp_lib_char8_t should be defined in c++26"76#    endif77#    if __cpp_lib_char8_t != 201907L78#      error "__cpp_lib_char8_t should have the value 201907L in c++26"79#    endif80#  else81#    ifdef __cpp_lib_char8_t82#      error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!"83#    endif84#  endif85 86#endif // TEST_STD_VER > 2387 88// clang-format on89