Content deleted Content added
ce, rem tag |
→top: Mention the copy assignment operator. |
||
Line 1:
In the [[C++|C++ programming language]], the move assignment operator <code>=</code> is used for transferring a temporary object to an existing object. The move assignment operator, like most C++ operators, can be [[Operator overloading|overloaded]].
If the move assignment operator is not explicitly defined, the [[compiler]] generates an implicit move assignment operator ([[C++11]] and newer). The parameter of a move assignment operator is an [[rvalue reference]] (T&&) to type ''T'', where ''T'' is the object that defines the move assignment operator. The move assignment operator is different than a [[move constructor]] because a move assignment operator is called on an existing object, while a move constructor is called on an object created by the operation. Thereafter, the other object's data is no longer valid.
|