Phobos2029 algorithm example can't compile

Sam Hu samhudotsamhu at gmail.com
Wed May 13 01:41:29 PDT 2009


It can compile if import std.typecons and modify as below:

import std.typecons;
import std.algorithm;

void main()
{
  double[] a=[3.0,4,7,11,3,2,5];
  auto ret=reduce!("a+b","a+b*b")(tuple(0.0,0.0),a);
}
Here a explicit tuple is needed.


More information about the Digitalmars-d-learn mailing list