aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/typename8.C
blob: d2eb4cede91524a0f645e83b55e6cac55963731a (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
// Build don't link:

template < class T > class A
{
public:
  typedef typename T::myT anotherT; // ERROR - undefined type

  anotherT t; // ERROR - undefined type 

  A(anotherT _t) { // ERROR - undefined type
    t=_t;
  }

  anotherT getT() {
    return t;
  }
};

class B : public A< B >
{
public:
  typedef int myT;
};

int main() {
  B b;
}