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// clang-format off
13
14// <execution>
15
16// Test the feature test macros defined by <execution>
17
18/* Constant Value
19 __cpp_lib_execution 201603L [C++17]
20 201902L [C++20]
21*/
22
23#include <execution>
24#include "test_macros.h"
25
26#if TEST_STD_VER < 14
27
28# ifdef __cpp_lib_execution
29# error "__cpp_lib_execution should not be defined before c++17"
30# endif
31
32#elif TEST_STD_VER == 14
33
34# ifdef __cpp_lib_execution
35# error "__cpp_lib_execution should not be defined before c++17"
36# endif
37
38#elif TEST_STD_VER == 17
39
40# if !defined(_LIBCPP_VERSION)
41# ifndef __cpp_lib_execution
42# error "__cpp_lib_execution should be defined in c++17"
43# endif
44# if __cpp_lib_execution != 201603L
45# error "__cpp_lib_execution should have the value 201603L in c++17"
46# endif
47# else // _LIBCPP_VERSION
48# ifdef __cpp_lib_execution
49# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
50# endif
51# endif
52
53#elif TEST_STD_VER == 20
54
55# if !defined(_LIBCPP_VERSION)
56# ifndef __cpp_lib_execution
57# error "__cpp_lib_execution should be defined in c++20"
58# endif
59# if __cpp_lib_execution != 201902L
60# error "__cpp_lib_execution should have the value 201902L in c++20"
61# endif
62# else // _LIBCPP_VERSION
63# ifdef __cpp_lib_execution
64# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
65# endif
66# endif
67
68#elif TEST_STD_VER == 23
69
70# if !defined(_LIBCPP_VERSION)
71# ifndef __cpp_lib_execution
72# error "__cpp_lib_execution should be defined in c++23"
73# endif
74# if __cpp_lib_execution != 201902L
75# error "__cpp_lib_execution should have the value 201902L in c++23"
76# endif
77# else // _LIBCPP_VERSION
78# ifdef __cpp_lib_execution
79# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
80# endif
81# endif
82
83#elif TEST_STD_VER > 23
84
85# if !defined(_LIBCPP_VERSION)
86# ifndef __cpp_lib_execution
87# error "__cpp_lib_execution should be defined in c++26"
88# endif
89# if __cpp_lib_execution != 201902L
90# error "__cpp_lib_execution should have the value 201902L in c++26"
91# endif
92# else // _LIBCPP_VERSION
93# ifdef __cpp_lib_execution
94# error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
95# endif
96# endif
97
98#endif // TEST_STD_VER > 23
99
100

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