[Issue 15848] out doesn't call opAssign()
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Mar 30 20:01:10 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15848
Alex Parrill <initrd.gz at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |initrd.gz at gmail.com
--- Comment #3 from Alex Parrill <initrd.gz at gmail.com> ---
I don't think opAssign should be called here. Default initialization is not
assignment; declaring a variable does not call opAssign with T.init, it just
copies over T.init.
So the real issue is that `t`'s destructor is not being called when `foo(t)` is
ran.
--
More information about the Digitalmars-d-bugs
mailing list