On Friday, July 20, 2012 08:08:47 Jonathan M Davis wrote:
> On Friday, July 20, 2012 15:50:19 Namespace wrote:
> > Why on earth....?
> 
> http://stackoverflow.com/questions/6884996/questions-about-postblit-and-move
> - semantics
> 
> If you want to guarantee that you don't get any copies while moving an
> object around, it needs to be a reference type (which would include a
> pointer to a value type).

Alternatively, you can @disable this(this), which would make copies illegal, 
but then I'd be worried about code breaking when the compiler adjusted some of 
its optimizations (though it would generally be unlikely for a move to become 
a copy - the opposite would be far more likely, which wouldn't break 
anything).

- Jonathan M Davs

Reply via email to