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

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;