129 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// <execution>13 14// Test the feature test macros defined by <execution>15 16// clang-format off17 18#include <execution>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23# ifdef __cpp_lib_execution24# error "__cpp_lib_execution should not be defined before c++17"25# endif26 27# ifdef __cpp_lib_senders28# error "__cpp_lib_senders should not be defined before c++26"29# endif30 31#elif TEST_STD_VER == 1432 33# ifdef __cpp_lib_execution34# error "__cpp_lib_execution should not be defined before c++17"35# endif36 37# ifdef __cpp_lib_senders38# error "__cpp_lib_senders should not be defined before c++26"39# endif40 41#elif TEST_STD_VER == 1742 43# if !defined(_LIBCPP_VERSION)44# ifndef __cpp_lib_execution45# error "__cpp_lib_execution should be defined in c++17"46# endif47# if __cpp_lib_execution != 201603L48# error "__cpp_lib_execution should have the value 201603L in c++17"49# endif50# else51# ifdef __cpp_lib_execution52# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"53# endif54# endif55 56# ifdef __cpp_lib_senders57# error "__cpp_lib_senders should not be defined before c++26"58# endif59 60#elif TEST_STD_VER == 2061 62# if !defined(_LIBCPP_VERSION)63# ifndef __cpp_lib_execution64# error "__cpp_lib_execution should be defined in c++20"65# endif66# if __cpp_lib_execution != 201902L67# error "__cpp_lib_execution should have the value 201902L in c++20"68# endif69# else70# ifdef __cpp_lib_execution71# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"72# endif73# endif74 75# ifdef __cpp_lib_senders76# error "__cpp_lib_senders should not be defined before c++26"77# endif78 79#elif TEST_STD_VER == 2380 81# if !defined(_LIBCPP_VERSION)82# ifndef __cpp_lib_execution83# error "__cpp_lib_execution should be defined in c++23"84# endif85# if __cpp_lib_execution != 201902L86# error "__cpp_lib_execution should have the value 201902L in c++23"87# endif88# else89# ifdef __cpp_lib_execution90# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"91# endif92# endif93 94# ifdef __cpp_lib_senders95# error "__cpp_lib_senders should not be defined before c++26"96# endif97 98#elif TEST_STD_VER > 2399 100# if !defined(_LIBCPP_VERSION)101# ifndef __cpp_lib_execution102# error "__cpp_lib_execution should be defined in c++26"103# endif104# if __cpp_lib_execution != 201902L105# error "__cpp_lib_execution should have the value 201902L in c++26"106# endif107# else108# ifdef __cpp_lib_execution109# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"110# endif111# endif112 113# if !defined(_LIBCPP_VERSION)114# ifndef __cpp_lib_senders115# error "__cpp_lib_senders should be defined in c++26"116# endif117# if __cpp_lib_senders != 202406L118# error "__cpp_lib_senders should have the value 202406L in c++26"119# endif120# else121# ifdef __cpp_lib_senders122# error "__cpp_lib_senders should not be defined because it is unimplemented in libc++!"123# endif124# endif125 126#endif // TEST_STD_VER > 23127 128// clang-format on129