On 2 Maj, 11:42, Frank Bergemann <FBergem...@web.de> wrote:
> Hi,
>
> the (gcc-3.4.4) compiler complains, if i try to use a typedef of
> subclass in superclass:
>
[SNIP]
> template<typename X>
> class _common
> {
> public:
> * * * * typedef X ForType;
> * * * * typedef X::BaseType BaseType;
[snip]
As others already pointed out, this is because the compiler can't
detect that X::BaseType is a type: remember the typename keyword.
Perhaps your question should be dubbed Curiously Recurring Template
Question?
/Peter
|