Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++98 -fcxx-exceptions -verify %s |
| 2 | // RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -verify %s |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 3 | // RUN: %clang_cc1 -std=c++14 -fcxx-exceptions -fsized-deallocation -verify %s |
Richard Smith | 20eb9ba | 2018-06-14 00:40:20 +0000 | [diff] [blame^] | 4 | // RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -verify %s |
| 5 | // RUN: %clang_cc1 -std=c++2a -fcxx-exceptions -fsized-deallocation -verify %s |
| 6 | // |
| 7 | // RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -frelaxed-template-template-args -DRELAXED_TEMPLATE_TEMPLATE_ARGS=1 -verify %s |
| 8 | // RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s |
Tim Northover | 36bb6d5 | 2017-12-09 12:09:54 +0000 | [diff] [blame] | 9 | // RUN: %clang_cc1 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS -fsized-deallocation |
| 10 | // RUN: %clang_cc1 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify -fsized-deallocation %s |
Richard Smith | 3a8244d | 2018-05-01 05:02:45 +0000 | [diff] [blame] | 11 | // RUN: %clang_cc1 -fchar8_t -DNO_EXCEPTIONS -DCHAR8_T -verify -fsized-deallocation %s |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 12 | |
| 13 | // expected-no-diagnostics |
| 14 | |
Nico Weber | b2348f4 | 2016-01-19 15:15:31 +0000 | [diff] [blame] | 15 | // FIXME using `defined` in a macro has undefined behavior. |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 16 | #if __cplusplus < 201103L |
Richard Smith | 20eb9ba | 2018-06-14 00:40:20 +0000 | [diff] [blame^] | 17 | #define check(macro, cxx98, cxx11, cxx14, cxx17) cxx98 == 0 ? defined(__cpp_##macro) : __cpp_##macro != cxx98 |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 18 | #elif __cplusplus < 201402L |
Richard Smith | 20eb9ba | 2018-06-14 00:40:20 +0000 | [diff] [blame^] | 19 | #define check(macro, cxx98, cxx11, cxx14, cxx17) cxx11 == 0 ? defined(__cpp_##macro) : __cpp_##macro != cxx11 |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 20 | #elif __cplusplus < 201406L |
Richard Smith | 20eb9ba | 2018-06-14 00:40:20 +0000 | [diff] [blame^] | 21 | #define check(macro, cxx98, cxx11, cxx14, cxx17) cxx14 == 0 ? defined(__cpp_##macro) : __cpp_##macro != cxx14 |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 22 | #else |
Richard Smith | 20eb9ba | 2018-06-14 00:40:20 +0000 | [diff] [blame^] | 23 | #define check(macro, cxx98, cxx11, cxx14, cxx17) cxx17 == 0 ? defined(__cpp_##macro) : __cpp_##macro != cxx17 |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 24 | #endif |
| 25 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 26 | // --- C++17 features --- |
| 27 | |
Richard Smith | 38d91d4 | 2016-09-28 20:26:06 +0000 | [diff] [blame] | 28 | #if check(hex_float, 0, 0, 0, 201603) |
| 29 | #error "wrong value for __cpp_hex_float" |
| 30 | #endif |
| 31 | |
Richard Smith | 9d07ae7 | 2017-08-11 03:39:40 +0000 | [diff] [blame] | 32 | #if check(inline_variables, 0, 0, 0, 201606) |
Richard Smith | 6e4bedc | 2016-09-28 20:42:56 +0000 | [diff] [blame] | 33 | #error "wrong value for __cpp_inline_variables" |
| 34 | #endif |
| 35 | |
Richard Smith | 9d07ae7 | 2017-08-11 03:39:40 +0000 | [diff] [blame] | 36 | #if check(aligned_new, 0, 0, 0, 201606) |
Richard Smith | 6e4bedc | 2016-09-28 20:42:56 +0000 | [diff] [blame] | 37 | #error "wrong value for __cpp_aligned_new" |
| 38 | #endif |
| 39 | |
Richard Smith | 20eb9ba | 2018-06-14 00:40:20 +0000 | [diff] [blame^] | 40 | #if check(guaranteed_copy_elision, 0, 0, 0, 201606) |
| 41 | #error "wrong value for __cpp_guaranteed_copy_elision" |
| 42 | #endif |
| 43 | |
Richard Smith | 6cc02c2 | 2016-12-02 02:02:23 +0000 | [diff] [blame] | 44 | #if check(noexcept_function_type, 0, 0, 0, 201510) |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 45 | #error "wrong value for __cpp_noexcept_function_type" |
| 46 | #endif |
| 47 | |
Richard Smith | 38d91d4 | 2016-09-28 20:26:06 +0000 | [diff] [blame] | 48 | #if check(fold_expressions, 0, 0, 0, 201603) |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 49 | #error "wrong value for __cpp_fold_expressions" |
| 50 | #endif |
| 51 | |
Richard Smith | 38d91d4 | 2016-09-28 20:26:06 +0000 | [diff] [blame] | 52 | #if check(capture_star_this, 0, 0, 0, 201603) |
| 53 | #error "wrong value for __cpp_capture_star_this" |
| 54 | #endif |
| 55 | |
Richard Smith | b80bbca | 2017-02-21 23:58:29 +0000 | [diff] [blame] | 56 | // constexpr checked below |
Richard Smith | 38d91d4 | 2016-09-28 20:26:06 +0000 | [diff] [blame] | 57 | |
Richard Smith | 9d07ae7 | 2017-08-11 03:39:40 +0000 | [diff] [blame] | 58 | #if check(if_constexpr, 0, 0, 0, 201606) |
Richard Smith | 6e4bedc | 2016-09-28 20:42:56 +0000 | [diff] [blame] | 59 | #error "wrong value for __cpp_if_constexpr" |
| 60 | #endif |
| 61 | |
Richard Smith | 38d91d4 | 2016-09-28 20:26:06 +0000 | [diff] [blame] | 62 | // range_based_for checked below |
| 63 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 64 | // static_assert checked below |
| 65 | |
Richard Smith | 5105573 | 2018-05-30 19:54:52 +0000 | [diff] [blame] | 66 | #if check(deduction_guides, 0, 0, 0, 201703) |
Richard Smith | adae25d | 2017-07-25 23:31:42 +0000 | [diff] [blame] | 67 | #error "wrong value for __cpp_deduction_guides" |
| 68 | #endif |
| 69 | |
Richard Smith | 20eb9ba | 2018-06-14 00:40:20 +0000 | [diff] [blame^] | 70 | #if check(nontype_template_parameter_auto, 0, 0, 0, 201606) |
| 71 | #error "wrong value for __cpp_nontype_template_parameter_auto" |
| 72 | #endif |
| 73 | |
| 74 | // This is the old name (from P0096R4) for |
| 75 | // __cpp_nontype_template_parameter_auto |
Richard Smith | 9d07ae7 | 2017-08-11 03:39:40 +0000 | [diff] [blame] | 76 | #if check(template_auto, 0, 0, 0, 201606) |
Richard Smith | 6e4bedc | 2016-09-28 20:42:56 +0000 | [diff] [blame] | 77 | #error "wrong value for __cpp_template_auto" |
| 78 | #endif |
| 79 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 80 | #if check(namespace_attributes, 0, 0, 0, 201411) |
| 81 | // FIXME: allowed without warning in C++14 and C++11 |
| 82 | #error "wrong value for __cpp_namespace_attributes" |
| 83 | #endif |
| 84 | |
| 85 | #if check(enumerator_attributes, 0, 0, 0, 201411) |
| 86 | // FIXME: allowed without warning in C++14 and C++11 |
| 87 | #error "wrong value for __cpp_enumerator_attributes" |
| 88 | #endif |
| 89 | |
Richard Smith | 20eb9ba | 2018-06-14 00:40:20 +0000 | [diff] [blame^] | 90 | // This is an old name (from P0096R4), now removed from SD-6. |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 91 | #if check(nested_namespace_definitions, 0, 0, 0, 201411) |
| 92 | #error "wrong value for __cpp_nested_namespace_definitions" |
| 93 | #endif |
| 94 | |
Richard Smith | dbe74e0 | 2016-12-19 04:21:36 +0000 | [diff] [blame] | 95 | // inheriting_constructors checked below |
| 96 | |
Richard Smith | 9d07ae7 | 2017-08-11 03:39:40 +0000 | [diff] [blame] | 97 | #if check(variadic_using, 0, 0, 0, 201611) |
Richard Smith | adae25d | 2017-07-25 23:31:42 +0000 | [diff] [blame] | 98 | #error "wrong value for __cpp_variadic_using" |
| 99 | #endif |
| 100 | |
Richard Smith | 38d91d4 | 2016-09-28 20:26:06 +0000 | [diff] [blame] | 101 | #if check(aggregate_bases, 0, 0, 0, 201603) |
| 102 | #error "wrong value for __cpp_aggregate_bases" |
| 103 | #endif |
| 104 | |
Richard Smith | dbe74e0 | 2016-12-19 04:21:36 +0000 | [diff] [blame] | 105 | #if check(structured_bindings, 0, 0, 0, 201606) |
| 106 | #error "wrong value for __cpp_structured_bindings" |
| 107 | #endif |
Richard Smith | 6e4bedc | 2016-09-28 20:42:56 +0000 | [diff] [blame] | 108 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 109 | #if check(nontype_template_args, 0, 0, 0, 201411) |
| 110 | #error "wrong value for __cpp_nontype_template_args" |
| 111 | #endif |
| 112 | |
Richard Smith | 20eb9ba | 2018-06-14 00:40:20 +0000 | [diff] [blame^] | 113 | #if defined(RELAXED_TEMPLATE_TEMPLATE_ARGS) \ |
| 114 | ? check(template_template_args, 0, 0, 0, 201611) \ |
| 115 | : check(template_template_args, 0, 0, 0, 0) |
Richard Smith | cbe0793 | 2017-02-14 00:55:25 +0000 | [diff] [blame] | 116 | #error "wrong value for __cpp_template_template_args" |
| 117 | #endif |
| 118 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 119 | // --- C++14 features --- |
| 120 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 121 | #if check(binary_literals, 0, 0, 201304, 201304) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 122 | #error "wrong value for __cpp_binary_literals" |
| 123 | #endif |
| 124 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 125 | // (Removed from SD-6.) |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 126 | #if check(digit_separators, 0, 0, 201309, 201309) |
Richard Smith | 38af856 | 2014-11-12 21:16:38 +0000 | [diff] [blame] | 127 | #error "wrong value for __cpp_digit_separators" |
| 128 | #endif |
| 129 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 130 | #if check(init_captures, 0, 0, 201304, 201304) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 131 | #error "wrong value for __cpp_init_captures" |
| 132 | #endif |
| 133 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 134 | #if check(generic_lambdas, 0, 0, 201304, 201304) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 135 | #error "wrong value for __cpp_generic_lambdas" |
| 136 | #endif |
| 137 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 138 | #if check(sized_deallocation, 0, 0, 201309, 201309) |
Richard Smith | 38af856 | 2014-11-12 21:16:38 +0000 | [diff] [blame] | 139 | #error "wrong value for __cpp_sized_deallocation" |
| 140 | #endif |
| 141 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 142 | // constexpr checked below |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 143 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 144 | #if check(decltype_auto, 0, 0, 201304, 201304) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 145 | #error "wrong value for __cpp_decltype_auto" |
| 146 | #endif |
| 147 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 148 | #if check(return_type_deduction, 0, 0, 201304, 201304) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 149 | #error "wrong value for __cpp_return_type_deduction" |
| 150 | #endif |
| 151 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 152 | #if check(runtime_arrays, 0, 0, 0, 0) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 153 | #error "wrong value for __cpp_runtime_arrays" |
| 154 | #endif |
| 155 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 156 | #if check(aggregate_nsdmi, 0, 0, 201304, 201304) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 157 | #error "wrong value for __cpp_aggregate_nsdmi" |
| 158 | #endif |
| 159 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 160 | #if check(variable_templates, 0, 0, 201304, 201304) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 161 | #error "wrong value for __cpp_variable_templates" |
| 162 | #endif |
| 163 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 164 | // --- C++11 features --- |
| 165 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 166 | #if check(unicode_characters, 0, 200704, 200704, 200704) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 167 | #error "wrong value for __cpp_unicode_characters" |
| 168 | #endif |
| 169 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 170 | #if check(raw_strings, 0, 200710, 200710, 200710) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 171 | #error "wrong value for __cpp_raw_strings" |
| 172 | #endif |
| 173 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 174 | #if check(unicode_literals, 0, 200710, 200710, 200710) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 175 | #error "wrong value for __cpp_unicode_literals" |
| 176 | #endif |
| 177 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 178 | #if check(user_defined_literals, 0, 200809, 200809, 200809) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 179 | #error "wrong value for __cpp_user_defined_literals" |
| 180 | #endif |
| 181 | |
Richard Smith | 9d07ae7 | 2017-08-11 03:39:40 +0000 | [diff] [blame] | 182 | #if defined(NO_THREADSAFE_STATICS) ? check(threadsafe_static_init, 0, 0, 0, 0) : check(threadsafe_static_init, 200806, 200806, 200806, 200806) |
| 183 | #error "wrong value for __cpp_threadsafe_static_init" |
| 184 | #endif |
| 185 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 186 | #if check(lambdas, 0, 200907, 200907, 200907) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 187 | #error "wrong value for __cpp_lambdas" |
| 188 | #endif |
| 189 | |
Richard Smith | b80bbca | 2017-02-21 23:58:29 +0000 | [diff] [blame] | 190 | #if check(constexpr, 0, 200704, 201304, 201603) |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 191 | #error "wrong value for __cpp_constexpr" |
| 192 | #endif |
| 193 | |
Richard Smith | 38d91d4 | 2016-09-28 20:26:06 +0000 | [diff] [blame] | 194 | #if check(range_based_for, 0, 200907, 200907, 201603) |
Richard Smith | 38af856 | 2014-11-12 21:16:38 +0000 | [diff] [blame] | 195 | #error "wrong value for __cpp_range_based_for" |
| 196 | #endif |
| 197 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 198 | #if check(static_assert, 0, 200410, 200410, 201411) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 199 | #error "wrong value for __cpp_static_assert" |
| 200 | #endif |
| 201 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 202 | #if check(decltype, 0, 200707, 200707, 200707) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 203 | #error "wrong value for __cpp_decltype" |
| 204 | #endif |
| 205 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 206 | #if check(attributes, 0, 200809, 200809, 200809) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 207 | #error "wrong value for __cpp_attributes" |
| 208 | #endif |
| 209 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 210 | #if check(rvalue_references, 0, 200610, 200610, 200610) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 211 | #error "wrong value for __cpp_rvalue_references" |
| 212 | #endif |
| 213 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 214 | #if check(variadic_templates, 0, 200704, 200704, 200704) |
Richard Smith | 91e474f | 2013-11-27 22:58:16 +0000 | [diff] [blame] | 215 | #error "wrong value for __cpp_variadic_templates" |
| 216 | #endif |
Richard Smith | 38af856 | 2014-11-12 21:16:38 +0000 | [diff] [blame] | 217 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 218 | #if check(initializer_lists, 0, 200806, 200806, 200806) |
Richard Smith | 38af856 | 2014-11-12 21:16:38 +0000 | [diff] [blame] | 219 | #error "wrong value for __cpp_initializer_lists" |
| 220 | #endif |
| 221 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 222 | #if check(delegating_constructors, 0, 200604, 200604, 200604) |
Richard Smith | 38af856 | 2014-11-12 21:16:38 +0000 | [diff] [blame] | 223 | #error "wrong value for __cpp_delegating_constructors" |
| 224 | #endif |
| 225 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 226 | #if check(nsdmi, 0, 200809, 200809, 200809) |
Richard Smith | 38af856 | 2014-11-12 21:16:38 +0000 | [diff] [blame] | 227 | #error "wrong value for __cpp_nsdmi" |
| 228 | #endif |
| 229 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 230 | #if check(inheriting_constructors, 0, 201511, 201511, 201511) |
Richard Smith | 38af856 | 2014-11-12 21:16:38 +0000 | [diff] [blame] | 231 | #error "wrong value for __cpp_inheriting_constructors" |
| 232 | #endif |
| 233 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 234 | #if check(ref_qualifiers, 0, 200710, 200710, 200710) |
Richard Smith | 38af856 | 2014-11-12 21:16:38 +0000 | [diff] [blame] | 235 | #error "wrong value for __cpp_ref_qualifiers" |
| 236 | #endif |
| 237 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 238 | #if check(alias_templates, 0, 200704, 200704, 200704) |
Richard Smith | 38af856 | 2014-11-12 21:16:38 +0000 | [diff] [blame] | 239 | #error "wrong value for __cpp_alias_templates" |
| 240 | #endif |
Faisal Vali | 24d59d1 | 2015-05-22 01:11:10 +0000 | [diff] [blame] | 241 | |
Richard Smith | b02043c | 2016-09-28 19:44:50 +0000 | [diff] [blame] | 242 | // --- C++98 features --- |
| 243 | |
| 244 | #if defined(NO_RTTI) ? check(rtti, 0, 0, 0, 0) : check(rtti, 199711, 199711, 199711, 199711) |
| 245 | #error "wrong value for __cpp_rtti" |
| 246 | #endif |
| 247 | |
| 248 | #if defined(NO_EXCEPTIONS) ? check(exceptions, 0, 0, 0, 0) : check(exceptions, 199711, 199711, 199711, 199711) |
| 249 | #error "wrong value for __cpp_exceptions" |
| 250 | #endif |
| 251 | |
| 252 | // --- TS features -- |
| 253 | |
JF Bastien | e3c13a8 | 2016-03-22 21:12:48 +0000 | [diff] [blame] | 254 | #if check(experimental_concepts, 0, 0, CONCEPTS_TS, CONCEPTS_TS) |
Faisal Vali | 24d59d1 | 2015-05-22 01:11:10 +0000 | [diff] [blame] | 255 | #error "wrong value for __cpp_experimental_concepts" |
| 256 | #endif |
Richard Smith | 3fa73f3 | 2015-10-22 04:27:47 +0000 | [diff] [blame] | 257 | |
Eric Fiselier | 4bf9282 | 2017-05-25 14:58:46 +0000 | [diff] [blame] | 258 | #if defined(COROUTINES) ? check(coroutines, 201703L, 201703L, 201703L, 201703L) : check(coroutines, 0, 0, 0, 0) |
Richard Smith | 3fa73f3 | 2015-10-22 04:27:47 +0000 | [diff] [blame] | 259 | #error "wrong value for __cpp_coroutines" |
| 260 | #endif |
Richard Smith | 3a8244d | 2018-05-01 05:02:45 +0000 | [diff] [blame] | 261 | |
| 262 | // --- not-yet-standard features -- |
| 263 | |
| 264 | #if defined(CHAR8_T) ? check(char8_t, 201803, 201803, 201803, 201803) : check(char8_t, 0, 0, 0, 0) |
| 265 | #error "wrong value for __cpp_char8_t" |
| 266 | #endif |