comparison gcc/testsuite/g++.dg/cpp0x/alias-decl-16.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 // Origin PR c++/51143
2 // { dg-do compile { target 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; // { dg-error "'A3' does not name a type" }
27
28 int main() { }