This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;
} 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]