2 // { dg-options "-std=gnu++11" }
8 #elif __cpp_rtti != 199711
9 # error "__cpp_rtti != 199711"
12 #ifndef __cpp_exceptions
13 # error "__cpp_exceptions"
14 #elif __cpp_exceptions != 199711
15 # error "__cpp_exceptions != 199711"
20 #ifndef __cpp_unicode_characters
21 # error "__cpp_unicode_characters"
22 #elif __cpp_unicode_characters != 200704
23 # error "__cpp_unicode_characters != 200704"
26 #ifndef __cpp_raw_strings
27 # error "__cpp_raw_strings"
28 #elif __cpp_raw_strings != 200710
29 # error "__cpp_raw_strings != 200710"
32 #ifndef __cpp_unicode_literals
33 # error "__cpp_unicode_literals"
34 #elif __cpp_unicode_literals != 200710
35 # error "__cpp_unicode_literals != 200710"
38 #ifndef __cpp_user_defined_literals
39 # error "__cpp_user_defined_literals"
40 #elif __cpp_user_defined_literals != 200809
41 # error "__cpp_user_defined_literals != 200809"
45 # error "__cpp_lambdas"
46 #elif __cpp_lambdas != 200907
47 # error "__cpp_lambdas != 200907"
50 #ifndef __cpp_constexpr
51 # error "__cpp_constexpr"
52 #elif __cpp_constexpr != 200704
53 # error "__cpp_constexpr != 200704"
56 #ifndef __cpp_range_based_for
57 # error "__cpp_range_based_for"
58 #elif __cpp_range_based_for < 200907
59 # error "__cpp_range_based_for < 200907"
62 #ifndef __cpp_static_assert
63 # error "__cpp_static_assert"
64 #elif __cpp_static_assert != 200410
65 # error "__cpp_static_assert != 200410"
68 #ifndef __cpp_decltype
69 # error "__cpp_decltype"
70 #elif __cpp_decltype != 200707
71 # error "__cpp_decltype != 200707"
74 #ifndef __cpp_attributes
75 # error "__cpp_attributes"
76 #elif __cpp_attributes != 200809
77 # error "__cpp_attributes != 200809"
80 #ifndef __cpp_rvalue_references
81 # error "__cpp_rvalue_references"
82 #elif __cpp_rvalue_references != 200610
83 # error "__cpp_rvalue_references != 200610"
86 #ifndef __cpp_variadic_templates
87 # error "__cpp_variadic_templates"
88 #elif __cpp_variadic_templates != 200704
89 # error "__cpp_variadic_templates != 200704"
92 #ifndef __cpp_initializer_lists
93 # error "__cpp_initializer_lists"
94 #elif __cpp_initializer_lists != 200806
95 # error "__cpp_initializer_lists != 200806"
98 #ifndef __cpp_delegating_constructors
99 # error "__cpp_delegating_constructors"
100 #elif __cpp_delegating_constructors != 200604
101 # error "__cpp_delegating_constructors != 200604"
105 # error "__cpp_nsdmi"
106 #elif __cpp_nsdmi != 200809
107 # error "__cpp_nsdmi != 200809"
110 #ifndef __cpp_inheriting_constructors
111 # error "__cpp_inheriting_constructors"
112 #elif __cpp_inheriting_constructors!= 201511
113 # error "__cpp_inheriting_constructors != 201511"
116 #ifndef __cpp_ref_qualifiers
117 # error "__cpp_ref_qualifiers"
118 #elif __cpp_ref_qualifiers != 200710
119 # error "__cpp_ref_qualifiers != 200710"
122 #ifndef __cpp_alias_templates
123 # error "__cpp_alias_templates"
124 #elif __cpp_alias_templates != 200704
125 # error "__cpp_alias_templates != 200704"
128 #ifndef __cpp_threadsafe_static_init
129 # error "__cpp_threadsafe_static_init"
130 #elif __cpp_threadsafe_static_init != 200806
131 # error "__cpp_threadsafe_static_init != 200806"
134 // C++14 features allowed in C++11 in non-ANSI modes:
136 #ifndef __cpp_binary_literals
137 # error "__cpp_binary_literals"
138 #elif __cpp_binary_literals != 201304
139 # error "__cpp_binary_literals != 201304"
144 #ifndef __cpp_runtime_arrays
145 # error "__cpp_runtime_arrays"
146 #elif __cpp_runtime_arrays != 198712
147 # error "__cpp_runtime_arrays != 198712"
152 #ifdef __has_cpp_attribute
153 # if ! __has_cpp_attribute(noreturn)
154 # error "__has_cpp_attribute(noreturn)"
155 # elif __has_cpp_attribute(noreturn) != 200809
156 # error "__has_cpp_attribute(noreturn) != 200809"
159 # error "__has_cpp_attribute"
162 #ifdef __has_cpp_attribute
163 // Attribute carries_dependency not in yet.
164 //# if ! __has_cpp_attribute(carries_dependency)
165 //# error "__has_cpp_attribute(carries_dependency)"
166 //# elif __has_cpp_attribute(carries_dependency) != 200809
167 //# error "__has_cpp_attribute(carries_dependency) != 200809"
170 # error "__has_cpp_attribute"
175 // Attribute [[deprecated]] is allowed in C++11 as an extension.
176 #ifdef __has_cpp_attribute
177 # if ! __has_cpp_attribute(deprecated)
178 # error "__has_cpp_attribute(deprecated)"
179 # elif __has_cpp_attribute(deprecated) != 201309
180 # error "__has_cpp_attribute(deprecated) != 201309"
183 # error "__has_cpp_attribute"