[Issue 12170] sum(double[]) is not pure nothrow
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 15 06:49:40 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12170
--- Comment #3 from bearophile_hugs at eml.cc 2014-02-15 06:49:39 PST ---
(In reply to comment #1)
> The problem is this:
>
> "Cyclic functions (i.e. functions that wind up directly or indirectly calling
> themselves) are inferred as being impure, throwing, and @system."
Until that compiler limitation is lifted, a solution is to convert the
recursive algorithm of sum() in an iterative one. Because sum() is something
you often want to use in pure nothrow functions.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list