D's equivalent to C++'s std::move?

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 13 15:19:37 PST 2016


On Saturday, 13 February 2016 at 22:42:34 UTC, Ola Fosheim 
Grøstad wrote:
> Hmm, do you have a reference (URL) to the "valid but 
> unspecified state" part? I'm not quite sure what that refers to.

Nevermind, I don't need a reference. I think what you refer to is 
just a statement that says that you can do whatever you want, but 
the destructor will run so the object must be in a valid state?

> tmp = a
> a = b
> b = a

Duh, "b=tmp"...



More information about the Digitalmars-d mailing list