[Issue 19525] Duration is not usable with zero-arg std.algorithm.sum

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 30 13:15:43 UTC 2019


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

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@Zevenberge created dlang/phobos pull request #7339 "Improved error message
when calling sum without a default value" mentioning this issue:

- Improved error message when calling sum without a default value

  If sum() is called, it tries to find a default value by constructing it with
0 (e.g. float(0)). This works for numbers, but produces obscure errors if the
value cannot be constructed this way (e.g. issue #19525). The error message now
states that the problem lies in the default value and suggests to supply one
instead.

https://github.com/dlang/phobos/pull/7339

--


More information about the Digitalmars-d-bugs mailing list