Phobos2029 algorithm example can't compile

Sam samhudotsamhu at gmail.com
Mon May 4 23:24:09 PDT 2009


double[] a=[3.0,4,7,11,3,2,5];
auto ret=reduce!("a+a","a+b*b")(0.0,0.0,a);

phobos2Ex.d(13): Error: template std.algorithm.Reduce!("a+a","a+b*b").reduce(E,Range) does not match any function template declaration
phobos2Ex.d(13): Error: template std.algorithm.Reduce!("a+a","a+b*b").reduce(E,Range) cannot deduce template function from argument types !()(double,double,double[])
*** Errors occurred during this build ***
What's wrong here?Help.


More information about the Digitalmars-d-learn mailing list