Discussion Thread: DIP 1040--Copying, Moving, and Forwarding--Community Review Round 1

deadalnix deadalnix at gmail.com
Thu Mar 11 10:19:51 UTC 2021


On Thursday, 11 March 2021 at 08:42:32 UTC, Walter Bright wrote:
> Constructing from an rvalue essentially is move construction.

No, you need to destroy that rvalue.

You'll note that C++ move constructor still require the old 
object to be in a "null" state so that its destruction can 
effectively be a noop.

When a constructor is involved, you create a new object, and need 
to do something with the existing ones.

This is why I was suggesting to recycle the postblit instead as a 
"postmove" constructor.


More information about the Digitalmars-d mailing list