“type”: 模板参数不能是包含“auto”的类型
指定的模板参数类型不能使用 auto 关键字。
更正此错误
- 不要用 auto 关键字指定模板参数。
示例
下面的示例会产生 C3539。
// C3539.cpp
// Compile with /Zc:auto
template<class T> class C{};
int main()
{
C<auto> c; // C3539
return 0;
}
“type”: 模板参数不能是包含“auto”的类型
指定的模板参数类型不能使用 auto 关键字。
下面的示例会产生 C3539。
// C3539.cpp
// Compile with /Zc:auto
template<class T> class C{};
int main()
{
C<auto> c; // C3539
return 0;
}