[Issue 3481] PATCH: opPow(), x ^^ y as a power operator
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 6 13:16:46 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3481
Andrei Alexandrescu <andrei at metalanguage.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrei at metalanguage.com
--- Comment #2 from Andrei Alexandrescu <andrei at metalanguage.com> 2009-11-06 13:16:46 PST ---
Sweet. Suggestion: rewrite x^^=y into powAssign(x, y) and define powAssign
appropriately, e.g.:
ref B powAssign(B, E)(ref B b, E e) if (isNumeric!B && isNumeric!E);
That way you don't need any trick to evaluate x only once etc.
--
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