編譯器錯誤 C3268
'function' :泛型函式或泛型類別的成員函式不能有變數參數列表
備註
Visual Studio 2015 中已淘汰 /clr:pure 和 /clr:safe 編譯程序選項,且 Visual Studio 2017 不支援。
如需詳細資訊,請參閱泛型。
範例
下列範例會產生 C3268。
// C3268.cpp
// compile with: /clr:pure /c
generic <class ItemType>
void Test(ItemType item, ...) {} // C3268
// try the following line instead
// void Test(ItemType item) {}
generic <class ItemType2>
ref struct MyStruct { void Test(...){} }; // C3268
// try the following line instead
// ref struct MyStruct { void Test2(){} }; // OK