Tag
Move Switch
Switch to force move.
Tags
Move
Move instead of assign.
Remarks
The difference between move constructor and copy constructor is that the source object is not copied but moved into the target object. The source object can lose its content and will be empty after this operation in this case. A move constructor can sigificantly faster than a copy constructor.
Examples
String source("hello");
String target(source, Move()); // source is moved to target
std::cout << source; //nothing printed since source lost content
std::cout << target; //"hello"
See Also
SeqAn - Sequence Analysis Library - www.seqan.de