Compiler Error C3194
'member' : a value-type cannot have an assignment operator
Special member functions that require automatic invocation by the compiler, such as a copy constructor or copy assignment operator are not supported within a value class.
Example
The following sample generates C3194.
// C3194.cpp
// compile with: /clr /c
value struct MyStruct {
MyStruct& operator= (const MyStruct& i) { return *this; } // C3194
};
ref struct MyStruct2 {
MyStruct2% operator= (const MyStruct2% i) { return *this; } // OK
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for