'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;
}