[Issue 3561] math.abs signature accepts static arrays, but errors internally.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Nov 3 12:43:47 PST 2015


https://issues.dlang.org/show_bug.cgi?id=3561

--- Comment #8 from Vladimir Panteleev <thecybershadow at gmail.com> ---
(In reply to Vladimir Panteleev from comment #6)
> Hard-coding the functionality into abs seems like a suboptimal
> direction to take today, as there is no special logic to this that is
> specific to abs and would not apply to any other unary function.

To expand on this: we don't have an overload of max that takes an array because
that's what reduce!max does. There could be a similar apply function where
apply!abs does what the OP asked.

--


More information about the Digitalmars-d-bugs mailing list