August 10, 2010
This code used to work in dmd2047 and does not in the current beta:

[CODE]
import std.algorithm;

void main()
{
     int[3] colSum;

     auto average = reduce!("a + b")(0, colSum);
}
[/CODE]

now the compiler 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])) cannot deduce template function from
argument types !()(int,int[3u])

UPDATE: i am sorry if you get this twice, but i wanted to resend it with a subscriber address again to be sure it gets noticed.

Regards,
     Stephan
September 17, 2010
Hi Stephan,

I fixed this bug a while ago but forgot to reply to this. So I'm doing now... better late than never :o).

Andrei

On 8/10/10 6:02 CDT, Stephan Dilly wrote:
> This code used to work in dmd2047 and does not in the current beta:
>
> [CODE]
> import std.algorithm;
>
> void main()
> {
> int[3] colSum;
>
> auto average = reduce!("a + b")(0, colSum);
> }
> [/CODE]
>
> now the compiler 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])) cannot deduce template function from
> argument types !()(int,int[3u])
>
> UPDATE: i am sorry if you get this twice, but i wanted to resend it with a subscriber address again to be sure it gets noticed.
>
> Regards,
> Stephan
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta