Udostępnij przez


Błąd kompilatora C3228

"function": argument typu ogólnego dla parametru "param" nie może być typem, musi być typem wartości lub typem uchwytu

Uwagi

Nieprawidłowy typ został przekazany jako argument typu ogólnego.

Example

Poniższy przykład generuje C3228:

// C3228.cpp
// compile with: /clr
class A {};

value class B {};

generic <class T>
void Test() {}

ref class C {
public:
   generic <class T>
   static void f() {}
};

int main() {
   C::f<A>();   // C3228
   C::f<B>();   // OK

   Test<C>();   // C3228
   Test<C ^>();   // OK
}