summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/template23.C
blob: d366eda5d8f7dc4f2cba3e12a46400372bd6c3e8 (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
29
30
31
32
33
34
// { dg-do assemble  }
// GROUPS passed templates
template <class T>
class T_Base
{};

template <class T>
class T_Derived
: public T_Base<T>
{};


class Base
{
public:
  Base (float name);
};

class Derived
: public Base
{
private:
  T_Base<int>*	data_;	// Fix (1): Change date_ from T_Base<int>* to T_Derived<int>*
  
public:
  Derived (float name); 
};


Derived::
Derived (float name)
:  Base(name),
   data_(new T_Derived<int>()) 
{}