Struct should be invalid after move

Sebastiaan Koppe mail at skoppe.eu
Tue Nov 27 10:32:40 UTC 2018


On Tuesday, 27 November 2018 at 09:39:13 UTC, Jonathan M Davis 
wrote:
> Well, the DIP to add opPostMove has been approved, and if 
> opPostMove is then @disabled, then that should disable moving 
> entirely (making it a compile error for it to happen at all, 
> not to access the struct after it's been moved), which is 
> probably a better approach. However, that will require that the 
> DIP actually be implemented, and AFAIK, there's no ETA on that.
>
> - Jonathan M Davis

But I actually want to move it. Just so that the variable moved 
from is considered invalid afterwards.


More information about the Digitalmars-d mailing list