D's equivalent to C++'s std::move?
Ola Fosheim Grøstad via Digitalmars-d
digitalmars-d at puremagic.com
Tue Feb 2 15:09:01 PST 2016
On Tuesday, 2 February 2016 at 22:36:22 UTC, Ali Çehreli wrote:
> This question has been brought up a lot lately. I've decided to
> look at this more seriously yesterday.
Nice to see that others are playing around with this, I don't
have time to check your code, but one key issue with move
semantics is exception safety.
AFAICT D's "std.move" is insufficient, as it would null out the
original pointer prematurely and when an exception is thrown the
resource will disappear rather than simple remain "unmoved".
More information about the Digitalmars-d
mailing list