On 2/18/12 7:59 AM, Michel Fortin wrote:
It'd be nice though if the default assignment operator for structs would be generated like this:if (&other != &this) { ~this(); // destruct memcpy(&this, &other, other.sizeof); // blit this(this); // postblit } because this is the correct thing to do on assignment 99% of the time. So you'd have less boilerplate code to write.
Heh, we discussed this years ago but it was forgotten. Andrei