87 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// <limits>13 14// Test the feature test macros defined by <limits>15 16// clang-format off17 18#include <limits>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23# ifdef __cpp_lib_char8_t24# error "__cpp_lib_char8_t should not be defined before c++20"25# endif26 27#elif TEST_STD_VER == 1428 29# ifdef __cpp_lib_char8_t30# error "__cpp_lib_char8_t should not be defined before c++20"31# endif32 33#elif TEST_STD_VER == 1734 35# ifdef __cpp_lib_char8_t36# error "__cpp_lib_char8_t should not be defined before c++20"37# endif38 39#elif TEST_STD_VER == 2040 41# if defined(__cpp_char8_t)42# ifndef __cpp_lib_char8_t43# error "__cpp_lib_char8_t should be defined in c++20"44# endif45# if __cpp_lib_char8_t != 201907L46# error "__cpp_lib_char8_t should have the value 201907L in c++20"47# endif48# else49# ifdef __cpp_lib_char8_t50# error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!"51# endif52# endif53 54#elif TEST_STD_VER == 2355 56# if defined(__cpp_char8_t)57# ifndef __cpp_lib_char8_t58# error "__cpp_lib_char8_t should be defined in c++23"59# endif60# if __cpp_lib_char8_t != 201907L61# error "__cpp_lib_char8_t should have the value 201907L in c++23"62# endif63# else64# ifdef __cpp_lib_char8_t65# error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!"66# endif67# endif68 69#elif TEST_STD_VER > 2370 71# if defined(__cpp_char8_t)72# ifndef __cpp_lib_char8_t73# error "__cpp_lib_char8_t should be defined in c++26"74# endif75# if __cpp_lib_char8_t != 201907L76# error "__cpp_lib_char8_t should have the value 201907L in c++26"77# endif78# else79# ifdef __cpp_lib_char8_t80# error "__cpp_lib_char8_t should not be defined when the requirement 'defined(__cpp_char8_t)' is not met!"81# endif82# endif83 84#endif // TEST_STD_VER > 2385 86// clang-format on87