Thoughts on versioning
rikki cattermole
rikki at cattermole.co.nz
Tue Oct 26 01:41:04 UTC 2021
Alternatively:
mixin template StandardAlgorithmComparison() {
Tuple!(Range1, Range2) mismatch(alias pred = "a == b", Range1,
Range2)(Range1 r1, Range2 r2)
if (isInputRange!(Range1) && isInputRange!(Range2))
{
for (; !r1.empty && !r2.empty; r1.popFront(), r2.popFront())
{
if (!binaryFun!(pred)(r1.front, r2.front)) break;
}
return tuple(r1, r2);
}
}
In std2.algorithm.comparison:
mixin StandardAlgorithmComparison;
In std.algorithm.comparison:
mixin StandardAlgorithmComparison;
More information about the Digitalmars-d
mailing list