编译器错误 C3268
“function”:泛型函数或泛型类的成员函数不能包含变量参数列表
备注
“/clr:pure”和“/clr:safe”编译器选项在 Visual Studio 2015 中已弃用,并且在 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