“模板类型”: 部分专用化中不允许有默认模板自变量
部分专用化的模板不能包含默认自变量。
下面的示例生成 C2756,并演示如何修复此错误:
// C2756.cpp
template <class T>
struct S {};
template <class T=int>
// try the following line instead
// template <class T>
struct S<T*> {}; // C2756
“模板类型”: 部分专用化中不允许有默认模板自变量
部分专用化的模板不能包含默认自变量。
下面的示例生成 C2756,并演示如何修复此错误:
// C2756.cpp
template <class T>
struct S {};
template <class T=int>
// try the following line instead
// template <class T>
struct S<T*> {}; // C2756