Programming Languages, Cpp, Software Development, Coding, Optimization.
making a copy will be inefficient, as we can cannibalise the content of source value. Similarly, prvalues can also be cannibalised as they do not have existence past the current expression. In this example, we take advantage of move-construction (line 2) and move-assignment (lines 3, 4) to quickly