This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
templates and inheritance
- From: Bar-Tov Aharon-R53349 <aharon dot bar-tov at freescale dot com>
- To: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Date: Tue, 16 May 2006 07:15:51 +0300
- Subject: templates and inheritance
hello,
something that seems like a problem (havn't found something in the bug base).
the following program produces an error message on g++ 3.4 and above
(cygwin, if this matters). it does compile on 3.3.3 and other c++ compilers.
thx
ronny
// --------------------------------
#include <stdio.h>
#include <iostream>
using namespace std;
template <class T>
class t_base
{
public:
T *ptr;
};
template <class T>
class t_derived : public t_base<T>
{
public:
t_derived() { ptr = NULL; }
};
int main()
{
t_derived<char> d;
return 0;
}