如何在模板基类中使用派生类的嵌套类
代码如下
编译提示错误: error C2039: “Z”: 不是“Y”的成员
template <typename T>
class X
{
public:
static void fun(const typename T::Z &z){}
};
class Y : public X<Y>
{
public:
class Z{};
};
int _tmain(int argc, _TCHAR* argv[])
{
Y y;
return 0;
}
编译提示错误: error C2039: “Z”: 不是“Y”的成员
...全文


