OSDN Git Service

/cp
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / alias-decl-16.C
1 // Origin PR c++/51143
2 // { dg-options "-std=c++11" }
3
4 using A0 = struct B0 { void f() {} };
5
6 template<int N>
7 using A1 =
8     struct B1 { // { dg-error "types may not be defined in alias template" }
9         static auto constexpr value = N;
10     };
11
12 A1<0> a1;
13
14 template<class T>
15 using A2 =
16     struct B2 {  // { dg-error "types may not be defined in alias template" }
17         void f(T){}
18     };
19
20 A2<bool> a2;
21
22 template<class T>
23 using A3 =
24     enum B3 {b = 0;}; //{ dg-error "types may not be defined in alias template" }
25
26 A3<int> a3;
27
28 int main() { }