Błąd kompilatora C2395Compiler Error C2395
"your_type:: operator'op" ": nieprawidłowy operator CLR lub WinRT.'your_type::operator'op'' : CLR or WinRT operator not valid. Co najmniej jeden parametr musi mieć następujące typy: "t", "t%", "&", "^", "^%", "^&", gdzie T = "your_type"At least one parameter must be of the following types: 'T', 'T%', 'T&', 'T^', 'T^%', 'T^&', where T = 'your_type'
Operator w środowisko wykonawcze systemu Windows lub typie zarządzanym nie ma co najmniej jednego parametru, którego typ jest taki sam jak typ zwracanej wartości operatora.An operator in a Windows Runtime or managed type did not have at least one parameter whose type is the same as the type of the operator return value.
Poniższy przykład generuje C2395 i pokazuje, jak to naprawić:The following sample generates C2395 and shows how to fix it:
// C2395.cpp
// compile with: /clr /c
value struct V {
static V operator *(int i, char c); // C2395
// OK
static V operator *(V v, char c);
// or
static V operator *(int i, V& rv);
};