annotate gcc/testsuite/g++.dg/cpp0x/alias-decl-16.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // Origin PR c++/51143
kono
parents:
diff changeset
2 // { dg-do compile { target c++11 } }
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 using A0 = struct B0 { void f() {} };
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 template<int N>
kono
parents:
diff changeset
7 using A1 =
kono
parents:
diff changeset
8 struct B1 { // { dg-error "types may not be defined in alias template" }
kono
parents:
diff changeset
9 static auto constexpr value = N;
kono
parents:
diff changeset
10 };
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 A1<0> a1;
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 template<class T>
kono
parents:
diff changeset
15 using A2 =
kono
parents:
diff changeset
16 struct B2 { // { dg-error "types may not be defined in alias template" }
kono
parents:
diff changeset
17 void f(T){}
kono
parents:
diff changeset
18 };
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 A2<bool> a2;
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 template<class T>
kono
parents:
diff changeset
23 using A3 =
kono
parents:
diff changeset
24 enum B3 {b = 0;}; //{ dg-error "types may not be defined in alias template" }
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 A3<int> a3; // { dg-error "'A3' does not name a type" }
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 int main() { }