Cannot inherit a typedef (in templates)

Dirk Zoller
Sat Jun 3 08:56:00 GMT 2000

A very short example without any preprocessor inference.

I think this should compile. (Microsoft C and Borland C compile it.)
If I could bundle type declarations as typedefs in a base class,
this would make working with complicated templates much easier.

class base
  typedef int laber_t;
  typedef long rhabarber_t;

template<class B>
class derived : public B
  laber_t i;
  rhabarber_t j;
  derived () : i (0), j (1) {}

  derived<base> k;

Dirk Zoller				Fon: 06106-876566
Obere Marktstraße 5			e-mail:
63110 Rodgau

More information about the Gcc-bugs mailing list