Why do I end Moving Constructor/Assignemnt ?
In your function:
Widget* makeWidget(int a, int b);
You are returning a Widget *
(i.e.: a pointer to Widget
) no move of an object takes place here at all.
Isn't that the same like Moving the return values, because you just pass the reference and not a copy?
It is not the same in terms of semantics, because by moving you always return an object.
By moving you are actually not copying, but moving the data from the move-from object (i.e.: the object being moved) to the move-to object (i.e.: the object being constructed or assigned to by means of the move constructor or move assignment operator, respectively).