The point is that depending on how the operator is called, a copy may be elided. Assume you use your operator like this:
extern T f();
...
T value;
value = f();
If the argument is taken by by T const&
the compiler has no choice but to hold on to the temporary and pass a a reference on to your assignment operator. On the other hand, when you pass the argument by value, i.e., it uses T
, the value returned from f()
can be located where this argument is, thereby eliding one copy. If the argument to the assignment is an lvalue in some form, it always needs to copy, of course.