```
import std.range;
import std.parallelism;

void vec_op (double [] outp, const double [] inp,
   double function (double) f)
{
   foreach (ref a, b; parallel (lockstep (outp, inp)))
      a = f (b);
}
```

Should this compile? dmd says

```
[...]/src/phobos/std/parallelism.d(4094): Error: cannot have parameter of type `void` [...]/src/phobos/std/parallelism.d(4095): Error: cannot have parameter of type `void` [...]/src/phobos/std/parallelism.d(3619): Error: template instance `std.parallelism.ParallelForeach!(Lockstep!(double[], const(double)[]))` error instantiating lspar.d(7): instantiated from here: `parallel!(Lockstep!(double[], const(double)[]))`
```

Reply via email to