Skip to content

Latest commit

 

History

History
1 lines (1 loc) · 364 Bytes

13.51.md

File metadata and controls

1 lines (1 loc) · 364 Bytes

Because the function clone return a rvalue. The compiler knows that the object being returned is about to be destroyed. So that when we construct a new object from the return value or assign the return value to an object, we call move constructor or move-assignment operator. Thus no copy is made. The resource is moved from the return object to the new object.