I would hope that the syntaxYes, you're right, they don't. At least not with my compiler. Is there a
template<class Tclass Derived1: public Base<T>
{
...
template<friend class Derived2<T>;
};
or
template<class Tclass Derived1: public Base<T>
{
...
template friend class Derived2<T>;
};
would work, but IIRC they don't.
reason for this? I also tried to use a forward declaration of Derived2
before the definition of Derived1 but obviously, those declaration
aren't allowed for templated classes, either. Again, I don't see why. If
a non-templated class is used in a forward definition, the compiler also
doesn't know what types are in that class.
Ralf