summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/typename8.C
blob: 4861cf301ed38b5d18bf635a7a95f2c1559bb0c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// { dg-do assemble  }

template < class T > class A
{
public:
  typedef typename T::myT anotherT; // { dg-error "" } undefined type

  anotherT t;

  A() { }
  A(anotherT _t) {
    t=_t;
  }

  anotherT getT() {
    return t;
  }
};

class B : public A< B > // { dg-error "" } forward declaration
{
public:
  typedef int myT;
};

int main() {
  B b;
}