Sdílet prostřednictvím


Chyba kompilátoru C2802

static member 'operator' has no formal parameters

Poznámky

Operátor deklarovaný členovou static funkcí musí mít alespoň jeden parametr.

Example

Následující příklad vygeneruje C2802:

// C2802.cpp
// compile with: /clr /c
ref class A {
   static operator+ ();   // C2802
   static operator+ (A^, A^);   // OK
};