summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/t12.C
blob: 86b65e21f466eb83ece862ea87a00b4e34ca10cb (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
// { dg-do assemble  }

class OBJECT {int a;};
class STDFILE {int b;};

template <class T> class VECTOR {
    T *v;
    int sz;
public:
    T& elem(int i) { return v[i]; }
    T& operator[] (int i);
};

template <class T>
class PVECTOR : VECTOR<void *> {
public:
    T*& elem(int i)
        {return (T*&) VECTOR<void *>::elem(i); }
    T*& operator[] (int i)
        {return (T*&) VECTOR<void *>::operator[](i);}
};

PVECTOR<OBJECT *> *foo;

PVECTOR<STDFILE *> *goo;