libcpp:
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / feat-cxx11-neg.C
bloba5b41f4d67d7d67172d6fcf01b931e6775b79054
1 // { dg-do compile { target c++11_only } }
2 // { dg-options "-pedantic-errors" }
4 // C++14 features:
6 #ifndef __cpp_binary_literals
7 #  error "__cpp_binary_literals" // { dg-error "error" }
8 #endif
10 #ifndef __cpp_init_captures
11 #  error "__cpp_init_captures" // { dg-error "error" }
12 #endif
14 #ifndef __cpp_generic_lambdas
15 #  error "__cpp_generic_lambdas" // { dg-error "error" }
16 #endif
18 #ifndef __cpp_decltype_auto
19 #  error "__cpp_decltype_auto" // { dg-error "error" }
20 #endif
22 #ifndef __cpp_return_type_deduction
23 #  error "__cpp_return_type_deduction" // { dg-error "error" }
24 #endif
26 #ifndef __cpp_variable_templates
27 #  error "__cpp_variable_templates" // { dg-error "error" }
28 #endif
30 #ifndef __cpp_digit_separators
31 #  error "__cpp_digit_separators" // { dg-error "error" }
32 #endif
34 #ifndef __cpp_aggregate_nsdmi
35 #  error "__cpp_aggregate_nsdmi" // { dg-error "error" }
36 #endif
38 //  Array TS features:
40 #ifndef __cpp_runtime_arrays
41 #  error "__cpp_runtime_arrays" // { dg-error "error" }
42 #endif
44 //  C++14 attributes:
46 //  Attribute [[deprecated]] is allowed in C++11 as an extension (with pedwarn).
47 //#ifdef __has_cpp_attribute
48 //#  if __has_cpp_attribute(deprecated) == 201309
49 //#    error "__has_cpp_attribute(deprecated)" // {  }
50 //#  endif
51 //#else
52 //#  error "__has_cpp_attribute"
53 //#endif