On Wednesday, 11 July 2018 at 10:07:33 UTC, Timoses wrote:
On Wednesday, 11 July 2018 at 08:31:30 UTC, Dorian Haglund
wrote:
[...]
As the error message says taskPool.reduce is a non-global
template. It's embedded in a taskPool struct. I can't say what
the reason is that a delegate cannot be
On Wednesday, 11 July 2018 at 08:31:30 UTC, Dorian Haglund wrote:
Hi.
I'm trying to use taskPool.reduce with a delegate, for example:
import std.parallelism;
int main(string[] args)
{
int f(int a, int b)
{
if (args.length > 1)
return a+b;
else
return a-b;
}
auto re
On Wednesday, 11 July 2018 at 08:31:30 UTC, Dorian Haglund wrote:
But it fails to compile (with gdc 8.1.0, dmd v2.081)
complaining that
template instance reduce!(f) cannot use local 'f' as parameter
to non-global template reduce(functions...)
Congratulations! You've just run into issue 571