共用方式為


編譯器錯誤 C3539

'type': 樣板引數的型別不可以包含 'auto'

指定的樣板引數型別中不可以使用 auto 關鍵字。

更正這個錯誤

  •  不要指定含有 auto 關鍵字的樣板引數。

範例

下列範例會產生 C3539 錯誤。

// C3539.cpp
// Compile with /Zc:auto
template<class T> class C{};
int main()
{
   C<auto> c;   // C3539
   return 0;
}

請參閱

參考

auto 關鍵字