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-exception
6//
7//===----------------------------------------------------------------------===//
8
9// WARNING: This test was generated by generate_feature_test_macro_components.py
10// and should not be edited manually.
11
12// <execution>
13
14// Test the feature test macros defined by <execution>
15
16// clang-format off
17
18#include <execution>
19#include "test_macros.h"
20
21#if TEST_STD_VER < 14
22
23# ifdef __cpp_lib_execution
24# error "__cpp_lib_execution should not be defined before c++17"
25# endif
26
27# ifdef __cpp_lib_senders
28# error "__cpp_lib_senders should not be defined before c++26"
29# endif
30
31#elif TEST_STD_VER == 14
32
33# ifdef __cpp_lib_execution
34# error "__cpp_lib_execution should not be defined before c++17"
35# endif
36
37# ifdef __cpp_lib_senders
38# error "__cpp_lib_senders should not be defined before c++26"
39# endif
40
41#elif TEST_STD_VER == 17
42
43# if !defined(_LIBCPP_VERSION)
44# ifndef __cpp_lib_execution
45# error "__cpp_lib_execution should be defined in c++17"
46# endif
47# if __cpp_lib_execution != 201603L
48# error "__cpp_lib_execution should have the value 201603L in c++17"
49# endif
50# else
51# ifdef __cpp_lib_execution
52# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
53# endif
54# endif
55
56# ifdef __cpp_lib_senders
57# error "__cpp_lib_senders should not be defined before c++26"
58# endif
59
60#elif TEST_STD_VER == 20
61
62# if !defined(_LIBCPP_VERSION)
63# ifndef __cpp_lib_execution
64# error "__cpp_lib_execution should be defined in c++20"
65# endif
66# if __cpp_lib_execution != 201902L
67# error "__cpp_lib_execution should have the value 201902L in c++20"
68# endif
69# else
70# ifdef __cpp_lib_execution
71# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
72# endif
73# endif
74
75# ifdef __cpp_lib_senders
76# error "__cpp_lib_senders should not be defined before c++26"
77# endif
78
79#elif TEST_STD_VER == 23
80
81# if !defined(_LIBCPP_VERSION)
82# ifndef __cpp_lib_execution
83# error "__cpp_lib_execution should be defined in c++23"
84# endif
85# if __cpp_lib_execution != 201902L
86# error "__cpp_lib_execution should have the value 201902L in c++23"
87# endif
88# else
89# ifdef __cpp_lib_execution
90# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
91# endif
92# endif
93
94# ifdef __cpp_lib_senders
95# error "__cpp_lib_senders should not be defined before c++26"
96# endif
97
98#elif TEST_STD_VER > 23
99
100# if !defined(_LIBCPP_VERSION)
101# ifndef __cpp_lib_execution
102# error "__cpp_lib_execution should be defined in c++26"
103# endif
104# if __cpp_lib_execution != 201902L
105# error "__cpp_lib_execution should have the value 201902L in c++26"
106# endif
107# else
108# ifdef __cpp_lib_execution
109# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
110# endif
111# endif
112
113# if !defined(_LIBCPP_VERSION)
114# ifndef __cpp_lib_senders
115# error "__cpp_lib_senders should be defined in c++26"
116# endif
117# if __cpp_lib_senders != 202406L
118# error "__cpp_lib_senders should have the value 202406L in c++26"
119# endif
120# else
121# ifdef __cpp_lib_senders
122# error "__cpp_lib_senders should not be defined because it is unimplemented in libc++!"
123# endif
124# endif
125
126#endif // TEST_STD_VER > 23
127
128// clang-format on
129
130

source code of libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp