I want to know if is it possible in C++ to do that :
template <typename T> class A { T link;};
template <typename U> class B { U link;};
class AA : A<BB> {};
class BB : B<AA> {};
because it generates the error :
error: ‘BB’ was not declared in this scope
error: template argument 1 is invalid
i have tryed to use anticipate declaration :
class AA;
class BB;
class AA : A<BB> {};
class BB : B<AA> {};
but it didn't work :
In instantiation of ‘A<AA>’:
error: ‘A<T>::s’ has incomplete type
error: forward declaration of ‘struct AA’
thank you for your help,