1 // { dg-options "-std=c++1z -I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" }
7 #elif __cpp_rtti != 199711
8 # error "__cpp_rtti != 199711"
11 #ifndef __cpp_exceptions
12 # error "__cpp_exceptions"
13 #elif __cpp_exceptions != 199711
14 # error "__cpp_exceptions != 199711"
19 #ifndef __cpp_raw_strings
20 # error "__cpp_raw_strings"
21 #elif __cpp_raw_strings != 200710
22 # error "__cpp_raw_strings != 200710"
25 #ifndef __cpp_unicode_literals
26 # error "__cpp_unicode_literals"
27 #elif __cpp_unicode_literals != 200710
28 # error "__cpp_unicode_literals != 200710"
31 #ifndef __cpp_user_defined_literals
32 # error "__cpp_user_defined_literals"
33 #elif __cpp_user_defined_literals != 200809
34 # error "__cpp_user_defined_literals != 200809"
38 # error "__cpp_lambdas"
39 #elif __cpp_lambdas != 200907
40 # error "__cpp_lambdas != 200907"
43 #ifndef __cpp_range_based_for
44 # error "__cpp_range_based_for"
45 #elif __cpp_range_based_for != 201603
46 # error "__cpp_range_based_for != 201603"
49 #ifndef __cpp_decltype
50 # error "__cpp_decltype"
51 #elif __cpp_decltype != 200707
52 # error "__cpp_decltype != 200707"
55 #ifndef __cpp_attributes
56 # error "__cpp_attributes"
57 #elif __cpp_attributes != 200809
58 # error "__cpp_attributes != 200809"
61 #ifndef __cpp_rvalue_references
62 # error "__cpp_rvalue_references"
63 #elif __cpp_rvalue_references != 200610
64 # error "__cpp_rvalue_references != 200610"
67 #ifndef __cpp_variadic_templates
68 # error "__cpp_variadic_templates"
69 #elif __cpp_variadic_templates != 200704
70 # error "__cpp_variadic_templates != 200704"
73 #ifndef __cpp_initializer_lists
74 # error "__cpp_initializer_lists"
75 #elif __cpp_initializer_lists != 200806
76 # error "__cpp_initializer_lists != 200806"
79 #ifndef __cpp_delegating_constructors
80 # error "__cpp_delegating_constructors"
81 #elif __cpp_delegating_constructors != 200604
82 # error "__cpp_delegating_constructors != 200604"
87 #elif __cpp_nsdmi != 200809
88 # error "__cpp_nsdmi != 200809"
91 #ifndef __cpp_inheriting_constructors
92 # error "__cpp_inheriting_constructors"
93 #elif __cpp_inheriting_constructors!= 200802
94 # error "__cpp_inheriting_constructors != 200802"
97 #ifndef __cpp_ref_qualifiers
98 # error "__cpp_ref_qualifiers"
99 #elif __cpp_ref_qualifiers != 200710
100 # error "__cpp_ref_qualifiers != 200710"
103 #ifndef __cpp_alias_templates
104 # error "__cpp_alias_templates"
105 #elif __cpp_alias_templates != 200704
106 # error "__cpp_alias_templates != 200704"
111 #ifndef __cpp_binary_literals
112 # error "__cpp_binary_literals"
113 #elif __cpp_binary_literals != 201304
114 # error "__cpp_binary_literals != 201304"
117 #ifndef __cpp_init_captures
118 # error "__cpp_init_captures"
119 #elif __cpp_init_captures != 201304
120 # error "__cpp_init_captures != 201304"
123 #ifndef __cpp_generic_lambdas
124 # error "__cpp_generic_lambdas"
125 #elif __cpp_generic_lambdas != 201304
126 # error "__cpp_generic_lambdas != 201304"
129 #ifndef __cpp_constexpr
130 # error "__cpp_constexpr"
131 #elif __cpp_constexpr != 201603
132 # error "__cpp_constexpr != 201603"
135 #ifndef __cpp_decltype_auto
136 # error "__cpp_decltype_auto"
137 #elif __cpp_decltype_auto != 201304
138 # error "__cpp_decltype_auto != 201304"
141 #ifndef __cpp_return_type_deduction
142 # error "__cpp_return_type_deduction"
143 #elif __cpp_return_type_deduction != 201304
144 # error "__cpp_return_type_deduction != 201304"
147 #ifndef __cpp_aggregate_nsdmi
148 # error "__cpp_aggregate_nsdmi"
149 #elif __cpp_aggregate_nsdmi != 201304
150 # error "__cpp_aggregate_nsdmi != 201304"
153 #ifndef __cpp_variable_templates
154 # error "__cpp_variable_templates"
155 #elif __cpp_variable_templates != 201304
156 # error "__cpp_variable_templates != 201304"
159 #ifndef __cpp_digit_separators
160 # error "__cpp_digit_separators"
161 #elif __cpp_digit_separators != 201309
162 # error "__cpp_digit_separators != 201309"
165 #ifndef __cpp_sized_deallocation
166 # error "__cpp_sized_deallocation"
167 #elif __cpp_sized_deallocation != 201309
168 # error "__cpp_sized_deallocation != 201309"
173 #ifndef __cpp_runtime_arrays
174 # error "__cpp_runtime_arrays"
175 #elif __cpp_runtime_arrays != 198712
176 # error "__cpp_runtime_arrays != 198712"
181 #ifdef __has_cpp_attribute
182 # if ! __has_cpp_attribute(noreturn)
183 # error "__has_cpp_attribute(noreturn)"
184 # elif __has_cpp_attribute(noreturn) != 200809
185 # error "__has_cpp_attribute(noreturn) != 200809"
188 # error "__has_cpp_attribute"
191 // Attribute carries_dependency not in yet.
192 //#ifdef __has_cpp_attribute
193 //# if ! __has_cpp_attribute(carries_dependency)
194 //# error "__has_cpp_attribute(carries_dependency)"
195 //# elif __has_cpp_attribute(carries_dependency) != 200809
196 //# error "__has_cpp_attribute(carries_dependency) != 200809"
199 //# error "__has_cpp_attribute"
204 #ifdef __has_cpp_attribute
205 # if ! __has_cpp_attribute(deprecated)
206 # error "__has_cpp_attribute(deprecated)"
207 # elif __has_cpp_attribute(deprecated) != 201309
208 # error "__has_cpp_attribute(deprecated) != 201309"
211 # error "__has_cpp_attribute"
216 // Check for __has_include macro.
217 #ifndef __has_include
218 # error "__has_include"
221 // Quoted complex.h should find at least the bracket version (use operator).
222 #if __has_include__ "complex.h"
227 // Try known bracket header (use operator).
228 #if __has_include__(<complex>)
233 // Define and use a macro to invoke the operator.
234 #define sluggo(TXT) __has_include__(TXT)
236 #if sluggo(<complex>)
241 #if ! sluggo(<complex>)
246 // Quoted complex.h should find at least the bracket version.
247 #if __has_include("complex.h")
252 // Try known local quote header.
253 #if __has_include("complex_literals.h")
255 # error "\"complex_literals.h\""
258 // Try nonexistent bracket header.
259 #if __has_include(<stuff>)
264 // Try nonexistent quote header.
265 #if __has_include("phlegm")
270 // Test __has_include_next.
271 #if __has_include("phoobhar.h")
272 # include "phoobhar.h"
274 # error "__has_include(\"phoobhar.h\")"
278 #define COMPLEX_INC "complex.h"
279 #if __has_include(COMPLEX_INC)
284 // Realistic use of __has_include.
285 #if __has_include(<array>)
288 template<typename _Tp, size_t _Num>
289 using array = std::array<_Tp, _Num>;
290 #elif __has_include(<tr1/array>)
292 # include <tr1/array>
293 template<typename _Tp, size_t _Num>
294 typedef std::tr1::array<_Tp, _Num> array;
299 #ifndef __cpp_unicode_characters
300 # error "__cpp_unicode_characters"
301 #elif __cpp_unicode_characters != 201411
302 # error "__cpp_unicode_characters != 201411"
305 #ifndef __cpp_static_assert
306 # error "__cpp_static_assert"
307 #elif __cpp_static_assert != 201411
308 # error "__cpp_static_assert != 201411"
311 #ifndef __cpp_namespace_attributes
312 # error "__cpp_namespace_attributes"
313 #elif __cpp_namespace_attributes != 201411
314 # error "__cpp_namespace_attributes != 201411"
317 #ifndef __cpp_enumerator_attributes
318 # error "__cpp_enumerator_attributes"
319 #elif __cpp_enumerator_attributes != 201411
320 # error "__cpp_enumerator_attributes != 201411"
323 #ifndef __cpp_nested_namespace_definitions
324 # error "__cpp_nested_namespace_definitions"
325 #elif __cpp_nested_namespace_definitions != 201411
326 # error "__cpp_nested_namespace_definitions != 201411"
329 #ifndef __cpp_fold_expressions
330 # error "__cpp_fold_expressions"
331 #elif __cpp_fold_expressions != 201603
332 # error "__cpp_fold_expressions != 201603"
335 #ifndef __cpp_nontype_template_args
336 # error "__cpp_nontype_template_args"
337 #elif __cpp_nontype_template_args != 201411
338 # error "__cpp_nontype_template_args != 201411"
341 #ifndef __cpp_hex_float
342 # error "__cpp_hex_float"
343 #elif __cpp_hex_float != 201603
344 # error "__cpp_hex_float != 201603"
347 #ifndef __cpp_if_constexpr
348 # error "__cpp_if_constexpr"
349 #elif __cpp_if_constexpr != 201606
350 # error "__cpp_if_constexpr != 201606"
353 #ifndef __cpp_aligned_new
354 # error "__cpp_aligned_new"
355 #elif __cpp_aligned_new != 201606
356 # error "__cpp_aligned_new != 201606"
359 #ifdef __has_cpp_attribute
361 # if ! __has_cpp_attribute(maybe_unused)
362 # error "__has_cpp_attribute(maybe_unused)"
363 # elif __has_cpp_attribute(maybe_unused) != 201603
364 # error "__has_cpp_attribute(maybe_unused) != 201603"
367 # if ! __has_cpp_attribute(nodiscard)
368 # error "__has_cpp_attribute(nodiscard)"
369 # elif __has_cpp_attribute(nodiscard) != 201603
370 # error "__has_cpp_attribute(nodiscard) != 201603"
374 # error "__has_cpp_attribute"