[Issue 15847] It is not an error to call opAssign on an uninitialized object

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Mar 29 08:34:24 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15847

monkeyworks12 at hotmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #2 from monkeyworks12 at hotmail.com ---
'Using void initialization doesn't mean "please turn the first assignment into
a construction".'

No, we definitely don't want that. My point is that it is never valid to have
opAssign called on a void initialized object that has a custom opAssign. It
works for simple value types, but anything with a custom opAssign cannot allow
it. Maybe void initialization should be disabled for types with custom
opAssign.

--


More information about the Digitalmars-d-bugs mailing list