[Issue 10146] ref on return is ignored
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 23 04:14:53 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10146
--- Comment #3 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-05-23 04:14:52 PDT ---
(In reply to comment #2)
> I expected that in this case opAssign is called, not the postblit, beause I
> return by ref and assign then the ref to a new value.
Actually no, because refness here does not matter. You return by ref, but get
not a ref in the caller. You don't assign ref to a new value either. You have A
a = Initializer; which calls copy constructor.
--
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