g++ rejects legal?
Giovanni Bajo
giovannibajo@libero.it
Thu Nov 4 13:42:00 GMT 2004
Richard Guenther wrote:
> Hi!
> There must be some weird C++ rules again. Consider:
Recursive instantiations.
You are trying to instantiate ComponentView<>, which, for some reason, requires
Array<> to be complete. Completing Array<> requires instantiating the prototype
of Array<>::comp() which, in turn, asks for ComponentView<> instantiation.
This does not happen with AltComponentView<> since its instantiation is not
required to complete Array<> so there is no loop.
Totally unrelated:
>>template <int Dim, class T, class EngineTag>
>>class Array
>>{
>> typedef Array<Dim, T, EngineTag> This_t;
typedef Array This_t;
as in: you don't need the typedef.
Giovanni Bajo
More information about the Gcc
mailing list