blob: 92101e9c99f1e7dae7f2a5def197da4974eb7047 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Test for helpful error message about missing typename.
template <class T> struct A { typedef T foo; typedef T bar; };
template <class T>
void f(T t)
{
typedef A<T>::foo type; // { dg-error "typename" }
A<T>::bar b; // { dg-error "typename" }
} // { dg-error "expected ';'" "" { target *-*-* } 8 }
template <class T> struct B
{
void f()
{
A<T>::baz z; // { dg-error "typename" }
} // { dg-error "expected ';'" "" { target *-*-* } 15 }
};
|