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