Discussion Thread: DIP 1040--Copying, Moving, and Forwarding--Community Review Round 1
deadalnix
deadalnix at gmail.com
Thu Mar 11 10:09:25 UTC 2021
On Thursday, 11 March 2021 at 04:17:48 UTC, tsbockman wrote:
> Also, doesn't this mean that every move of an object with a
> destructor requires a copy?
No, only if said object was initialized first.
> Does the copy constructor get called in such cases?
Why? That would not allow for the removal of the destruction, in
fact now you'd have 2 object to destroy instead of 1.
> If so, what benefit do moves have over copies?
They do not create a new object to destroy.
More information about the Digitalmars-d
mailing list