[Issue 5058] invariant() should not be called before opAssign()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 27 10:06:44 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5058



--- Comment #2 from Jonathan M Davis <jmdavisProg at gmx.com> 2010-10-27 10:05:54 PDT ---
The problem is that that then seriously reduces the useability of struct
invariants. At least if init violates the invariant, then the invariant will
fail if you used init rather than properly initializing a variable of that
struct type.

Regardless, I don't see why it would matter what the state of the object is
prior to opAssign() being called. That's like caring whether the invariant is
true prior to the constructor call.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list