1 // { dg-do compile { target c++98_only } }
5 #ifndef __cpp_runtime_arrays
6 # error "__cpp_runtime_arrays" // { dg-error "error" }
9 #ifndef __cpp_unicode_characters
10 # error "__cpp_unicode_characters" // { dg-error "error" }
13 #ifndef __cpp_raw_strings
14 # error "__cpp_raw_strings" // { dg-error "error" }
17 #ifndef __cpp_unicode_literals
18 # error "__cpp_unicode_literals" // { dg-error "error" }
21 #ifndef __cpp_user_defined_literals
22 # error "__cpp_user_defined_literals" // { dg-error "error" }
26 # error "__cpp_lambdas" // { dg-error "error" }
29 #ifndef __cpp_constexpr
30 # error "__cpp_constexpr" // { dg-error "error" }
33 #ifndef __cpp_static_assert
34 # error "__cpp_static_assert" // { dg-error "error" }
37 #ifndef __cpp_decltype
38 # error "__cpp_decltype" // { dg-error "error" }
41 #ifndef __cpp_attributes
42 # error "__cpp_attributes" // { dg-error "error" }
45 #ifndef __cpp_rvalue_references
46 # error "__cpp_rvalue_references" // { dg-error "error" }
49 #ifndef __cpp_variadic_templates
50 # error "__cpp_variadic_templates" // { dg-error "error" }
53 #ifndef __cpp_initializer_lists
54 # error "__cpp_initializer_lists" // { dg-error "error" }
57 #ifndef __cpp_delegating_constructors
58 # error "__cpp_delegating_constructors" // { dg-error "error" }
62 # error "__cpp_nsdmi" // { dg-error "error" }
65 #ifndef __cpp_inheriting_constructors
66 # error "__cpp_inheriting_constructors" // { dg-error "error" }
69 #ifndef __cpp_ref_qualifiers
70 # error "__cpp_ref_qualifiers" // { dg-error "error" }
73 #ifndef __cpp_alias_templates
74 # error "__cpp_alias_templates" // { dg-error "error" }
79 // C++98 gets binary literals in non-ANSI modes.
80 //#ifndef __cpp_binary_literals
81 //# error "__cpp_binary_literals"
84 #ifndef __cpp_init_captures
85 # error "__cpp_init_captures" // { dg-error "error" }
88 #ifndef __cpp_generic_lambdas
89 # error "__cpp_generic_lambdas" // { dg-error "error" }
92 #ifndef __cpp_decltype_auto
93 # error "__cpp_decltype_auto" // { dg-error "error" }
96 #ifndef __cpp_return_type_deduction
97 # error "__cpp_return_type_deduction" // { dg-error "error" }
100 #ifndef __cpp_aggregate_nsdmi
101 # error "__cpp_aggregate_nsdmi" // { dg-error "error" }
104 #ifndef __cpp_variable_templates
105 # error "__cpp_variable_templates" // { dg-error "error" }
108 #ifndef __cpp_digit_separators
109 # error "__cpp_digit_separators" // { dg-error "error" }
112 #ifndef __cpp_sized_deallocation
113 # error "__cpp_sized_deallocation" // { dg-error "error" }
118 #ifndef __cpp_namespace_attributes
119 # error "__cpp_namespace_attributes" // { dg-error "error" }
122 #ifndef __cpp_nested_namespace_definitions
123 # error "__cpp_nested_namespace_definitions" // { dg-error "error" }
128 #ifdef __has_cpp_attribute
129 # if __has_cpp_attribute(noreturn) == 200809
130 # error "__has_cpp_attribute(noreturn) == 200809" // { dg-error "error" }
133 # error "__has_cpp_attribute"
136 // Attribute carries_dependency not in yet.
137 //#ifdef __has_cpp_attribute
138 //# if __has_cpp_attribute(carries_dependency) == 200809
139 //# error "__has_cpp_attribute(carries_dependency) == 200809" // { }
142 //# error "__has_cpp_attribute"
147 // Attribute [[deprecated]] is allowed in C++11 as an extension.
148 //#ifdef __has_cpp_attribute
149 //# if __has_cpp_attribute(deprecated) == 201309
150 //# error "__has_cpp_attribute(deprecated)" // { }
153 //# error "__has_cpp_attribute"