Content deleted Content added
m Added reference |
mNo edit summary |
||
Line 1:
In the [[C++|C++ programming language]], the move assignment operator (=), is used for transferring ownership (moving) of an an already instantiated object or resource to another
If the move assignment operator is not explicitly defined, then the compiler will generate an implicit move assignment operator ([[C++11]] and newer). The parameters of a move assignment operator are an [[rvalue reference]] (T&&) to type ''T
__FORCETOC__
Line 11:
* Check if the object calling the operator is not calling the operator on itself.
* The current object's data is de-allocated.
* The object that is being moved from must have its data marked as [[nullptr]] (or something to signify the move)
* The operator returns a reference to "*this".
|