ky53900 2018-04-05 04:05 采纳率: 0%
浏览 955
已结题

关于模板类的模板参数的模板参数的类型实例化问题?

#include
using namespace std;

template < template class TT > class X {

};

template class C {
C* a;
C b;
X c; //为什么这个不行?
X< ::C> e;//为什么这个就可以呢?
X< C > f;//为什么这么写也不行??

C<int> g;

};

int main()
{

//为什么不行
X< C<int> > f;

return 1;

}

  • 写回答

1条回答 默认 最新

  • devmiao 2018-04-05 15:51
    关注
    评论

报告相同问题?