Jump to content

C++ Language/Indirection/RvalueReferences/MovingFromThis

From Wikibooks, open books for an open world

A function like AssignTo() is the opposite of a common assignment operator (assigning from this object to the parameter, instead of from the parameter to this object). To specify function overloading that distinguishes between move-semantics and copy-semantics, a function like AssignTo() would program either & or && immediately before the function body's opening curly-brace.

Additional information about move semantics when you move from the this pointer (includes interactive examples)