我有以下代码,我想知道为什么如果我改变
T* e;
线到
T;
它抛出一个错误:“Base1::e'使用未定义的类'Derived'”
template<class T> class Base1
{
public:
Base1() {};
virtual ~Base1() {};
T* e;
};
class Base2
{
public:
Base2() {};
};
class Derived : public Base1<Derived>, Base2
{
public:
Derived() {};
~Derived() {};
};