Bug 4618 – std.algorithm.reduce over fixed-size array (regression)
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-08-11T01:51:00Z
Last change time
2015-06-09T05:15:01Z
Keywords
rejects-valid
Assigned to
nobody
Creator
spam
Comments
Comment #0 by spam — 2010-08-11T01:51:41Z
this used to work in dmd2.047 since dmd2.048 it does not
[CODE]
import std.algorithm;
void main()
{
int[3] colSum;
auto average = reduce!("a + b")(0, colSum);
}
[/CODE]
dmd complains:
main.d(9): Error: template std.algorithm.reduce!("a + b").reduce(Args...) if (Args.length > 0 && Args.length <= 2 && isInputRange!(Args[__dollar - 1])) does not match any function template declaration
main.d(9): Error: template std.algorithm.reduce!("a + b").reduce(Args...) if (Args.length > 0 && Args.length <= 2 && isInputRange!(Args[__dollar - 1])) does not match any function template declaration
Comment #1 by IcyT — 2010-08-11T04:24:58Z
I'm wondering why this bug made it to the release version because it was already brought up on the beta mailing list.
Comment #2 by bugzilla — 2011-02-03T00:19:38Z
The problem seems to be gone in DMD 2.051. Please reopen if I'm wrong.