aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/typename3.C
blob: 0708f1f24953524284660cdcfdbb2d0f1ab515cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do assemble  }
// { dg-options "-Wno-deprecated" }

template <class T>
struct A
{
  typedef T A_Type;
};


template <class U>
struct B : public A<U>
{
  A_Type Func(); // { dg-error "does not name a type" "err" } implicit typename
  // { dg-message "note" "note" { target *-*-* } 14 }
};


template <class U>
B<U>::A_Type B<U>::Func() { // { dg-error "typename" } implicit typename
}			    // { dg-error "expected" }