Struct should be invalid after move

Sebastiaan Koppe mail at skoppe.eu
Wed Nov 28 07:48:54 UTC 2018


On Wednesday, 28 November 2018 at 00:28:35 UTC, Jonathan M Davis 
wrote:
> As such, having the compiler flag a variable being used after a 
> move would be pretty much equivalent to having it flag it if 
> you used a variable that was simply default-initialized rather 
> than having been given an explicit value.

Yep. Exactly.

I would love to opt-in such a feature via e.g.:

struct Handle {
    ...
   @disable Handle.init;
   ...
}


More information about the Digitalmars-d mailing list