72 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// <exception>13 14// Test the feature test macros defined by <exception>15 16// clang-format off17 18#include <exception>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23# ifdef __cpp_lib_uncaught_exceptions24# error "__cpp_lib_uncaught_exceptions should not be defined before c++17"25# endif26 27#elif TEST_STD_VER == 1428 29# ifdef __cpp_lib_uncaught_exceptions30# error "__cpp_lib_uncaught_exceptions should not be defined before c++17"31# endif32 33#elif TEST_STD_VER == 1734 35# ifndef __cpp_lib_uncaught_exceptions36# error "__cpp_lib_uncaught_exceptions should be defined in c++17"37# endif38# if __cpp_lib_uncaught_exceptions != 201411L39# error "__cpp_lib_uncaught_exceptions should have the value 201411L in c++17"40# endif41 42#elif TEST_STD_VER == 2043 44# ifndef __cpp_lib_uncaught_exceptions45# error "__cpp_lib_uncaught_exceptions should be defined in c++20"46# endif47# if __cpp_lib_uncaught_exceptions != 201411L48# error "__cpp_lib_uncaught_exceptions should have the value 201411L in c++20"49# endif50 51#elif TEST_STD_VER == 2352 53# ifndef __cpp_lib_uncaught_exceptions54# error "__cpp_lib_uncaught_exceptions should be defined in c++23"55# endif56# if __cpp_lib_uncaught_exceptions != 201411L57# error "__cpp_lib_uncaught_exceptions should have the value 201411L in c++23"58# endif59 60#elif TEST_STD_VER > 2361 62# ifndef __cpp_lib_uncaught_exceptions63# error "__cpp_lib_uncaught_exceptions should be defined in c++26"64# endif65# if __cpp_lib_uncaught_exceptions != 201411L66# error "__cpp_lib_uncaught_exceptions should have the value 201411L in c++26"67# endif68 69#endif // TEST_STD_VER > 2370 71// clang-format on72