Compartir a través de


Error del compilador C3268

"function": una función genérica o una función miembro de una clase genérica no puede tener una lista de parámetros variable

Comentarios

Las opciones del compilador /clr:pure y /clr:safe están en desuso en Visual Studio 2015 y no se admiten en Visual Studio 2017.

Para más información, consulte Genéricos.

Ejemplo

El ejemplo siguiente genera la advertencia 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