[Issue 1596] op*Assign should return void
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jul 8 16:47:33 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=1596
--- Comment #11 from Stewart Gordon <smjg at iname.com> 2011-07-08 16:42:24 PDT ---
I'm not sure you get the point. It's to give the class designer the choice
between in-place modification and creating a new object as the implementation
of op=.
OK, so a op= b ought to be automatically equivalent to a = a op b in the
absence of an opOpAssign. So the rule would be to define opOpAssign iff you
want it to modify in-place. But this still doesn't cover cases where whether
the modification is in-place isn't a compile-time constant. Look at how ~=
works for instance.
--
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