I\'ve been experimenting with the Curiously Recurring Template Pattern for a generic single-argument functor and have two implementations: one using a template template para
Your code could be simplified to
template class
Base
{
using Ftype = typename TDerived::type;
};
template class
Derived: public Base>
{
using type = T;
};
Derived wat;
It does not work because at the point of Base
instantiation Derived
class is not complete, and compiler is not aware of Derived::type
existence yet.