| 1 |
// { dg-do compile { target c++11_only } } |
| 2 |
|
| 3 |
// C++14 features: |
| 4 |
|
| 5 |
#ifndef __cpp_binary_literals |
| 6 |
# error "__cpp_binary_literals" // { dg-error "error" } |
| 7 |
#endif |
| 8 |
|
| 9 |
#ifndef __cpp_init_captures |
| 10 |
# error "__cpp_init_captures" // { dg-error "error" } |
| 11 |
#endif |
| 12 |
|
| 13 |
#ifndef __cpp_generic_lambdas |
| 14 |
# error "__cpp_generic_lambdas" // { dg-error "error" } |
| 15 |
#endif |
| 16 |
|
| 17 |
#ifndef __cpp_decltype_auto |
| 18 |
# error "__cpp_decltype_auto" // { dg-error "error" } |
| 19 |
#endif |
| 20 |
|
| 21 |
#ifndef __cpp_return_type_deduction |
| 22 |
# error "__cpp_return_type_deduction" // { dg-error "error" } |
| 23 |
#endif |
| 24 |
|
| 25 |
#ifndef __cpp_aggregate_nsdmi |
| 26 |
# error "__cpp_aggregate_nsdmi" // { dg-error "error" } |
| 27 |
#endif |
| 28 |
|
| 29 |
#ifndef __cpp_variable_templates |
| 30 |
# error "__cpp_variable_templates" // { dg-error "error" } |
| 31 |
#endif |
| 32 |
|
| 33 |
#ifndef __cpp_digit_separators |
| 34 |
# error "__cpp_digit_separators" // { dg-error "error" } |
| 35 |
#endif |
| 36 |
|
| 37 |
#ifndef __cpp_sized_deallocation |
| 38 |
# error "__cpp_sized_deallocation" // { dg-error "error" } |
| 39 |
#endif |
| 40 |
|
| 41 |
// C++17 features: |
| 42 |
|
| 43 |
#ifndef __cpp_namespace_attributes |
| 44 |
# error "__cpp_namespace_attributes" // { dg-error "error" } |
| 45 |
#endif |
| 46 |
|
| 47 |
#ifndef __cpp_nested_namespace_definitions |
| 48 |
# error "__cpp_nested_namespace_definitions" // { dg-error "error" } |
| 49 |
#endif |
| 50 |
|
| 51 |
|
| 52 |
// Array TS features: |
| 53 |
|
| 54 |
#ifndef __cpp_runtime_arrays |
| 55 |
# error "__cpp_runtime_arrays" // { dg-error "error" } |
| 56 |
#endif |
| 57 |
|
| 58 |
// C++14 attributes: |
| 59 |
|
| 60 |
// Attribute [[deprecated]] is allowed in C++11 as an extension. |
| 61 |
//#ifdef __has_cpp_attribute |
| 62 |
//# if __has_cpp_attribute(deprecated) == 201309 |
| 63 |
//# error "__has_cpp_attribute(deprecated)" // { } |
| 64 |
//# endif |
| 65 |
//#else |
| 66 |
//# error "__has_cpp_attribute" |
| 67 |
//#endif |