D's equivalent to C++'s std::move?
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Wed Feb 3 10:04:38 PST 2016
On 02/03/2016 10:05 AM, Sönke Ludwig wrote:
> For std.move, isn't the only place where an exception can be thrown in
> the destructor (which shouldn't throw)? It uses memcpy to move the
> memory around to circumvent any extended construction logic.
Destructors in D are allowed to throw (thanks to exception chaining),
but now I realize we need to amend that - the destructor of T.init
should not be allowed to throw. -- Andrei
More information about the Digitalmars-d
mailing list