Condividi tramite


Errore del compilatore C2802

static member 'operator operator' non ha parametri formali

Un operatore dichiarato da una static funzione membro deve avere almeno un parametro.

L'esempio seguente genera l'errore C2802:

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