On Sunday, 12 April 2015 at 04:18:54 UTC, Andrei Alexandrescu
wrote:
On 4/11/15 5:35 AM, matovitch wrote:
I am not convinced by the dip77, what about raii managed
classes with
costly opAssign operator (like in w0rn example) ? The goal of
passing an
object by reference is to avoid the copy and here you guess the
parameter is ref-counted and made a (pseudo-)copy ? Then any
allocating
opAssign should be marked @system ?
Expensive opAssign or expensive postblit? -- Andrei
Well both in the example given by w0rp. I guess D as no "rule of
five" but still a "rule of three" (which is in fact rule of four
with the copy-and-swap idiom) about coding posblit, opAssign and
destructor together ?