opy construction, assignment, container reallocation, string concatenation, and string copying are all instances of copy operations. However, in recent years a new paradigm is emerging: move semantics
. This discussion presents the concept of movingby showing how it differs from traditional copyingas well as move semantics applications and their benefits.
Though there are many tasks in which copying is the correct operation to carry out, frequently there are other instances in which the reduplication of resources that copying requires is unnecessary.
Apply move semantics through moved-based swapping to optimize swap operations, string concatenation, container reallocation, and many other common operations.