On Monday, 24 June 2013 at 14:56:41 UTC, bearophile wrote:
David:

Something seems to be wrong with opApply of lockstep.
Or maybe I miss something obvious...

I have suggested to remove lockstep from Phobos:
http://d.puremagic.com/issues/show_bug.cgi?id=8155

Why don't you try to use std.range.zip?

Bye,
bearophile

Funny you should mention that, I vaguely recalled you old thread,
and replaced lockstep with zip.

After making the following changes:

uint[ubyte.max - ubyte.min+1] bins;
  ...

foreach( e; zip( iota(ubyte.min, ubyte.max+1), bins ) )
{
    if(count > 0 ) {
        writeln("Bin = ", e[0], " count = ", e[1] );
    }
}

I now get the error (which seems to be the same problem I had
before - see the last error):

test.d(11): Error: template std.range.zip does not match any
function template declaration. Candidates are:
/usr/include/dmd/phobos/std/range.d(4451):
std.range.zip(Ranges...)(Ranges ranges) if (Ranges.length &&
allSatisfy!(isInputRange, Ranges))
/usr/include/dmd/phobos/std/range.d(4458):
std.range.zip(Ranges...)(StoppingPolicy sp, Ranges ranges) if
(Ranges.length && allSatisfy!(isInputRange, Ranges))
/usr/include/dmd/phobos/std/range.d(4451): Error: template
std.range.zip cannot deduce template function from argument types
!()(Result, uint[256LU])

Reply via email to