On 2013-48-23 11:01, deadalnix <[email protected]> wrote:
On Wednesday, 23 January 2013 at 10:28:05 UTC, Simen Kjaeraas wrote:
NonNull!T bar = something;
foo(move(bar));
bar; // bar is null \o/
Except it isn't.
move memcopy T.init . So it will be null.
Try it. Without a destructor, move does not revert to T.init. With a
destructor you get this:
src\phobos\std\algorithm.d(1564): Error: variable
std.algorithm.move!(NotNull!(int*)).move.empty initializer required for
type NotNull!(int*)
Error: template instance std.algorithm.move!(NotNull!(int*)) error
instantiating
This is what @disable this does, and what it's supposed to do.
--
Simen