CS202 6- ‹#›
Efficiency Considerations
nTemporary objects are often created by implicit type conversions or when arguments are returned by value.
nWhen an operator and its operands are evaluated, an rvalue is often created.
nThat rvalue is a temporary on the stack that can be used within a larger expression. The lifetime of the temporary is from the time it is created until the end of the statement in which it is used.
nWhile the use of temporaries is necessary to protect the original contents of the operator's operands, it does require additional memory and extra (and sometimes redundant) copy operations.