Comment #0 by bearophile_hugs — 2013-02-05T17:08:14Z
This used to print true-false, but in DMD 2.062alpha prints true-true on Windows:
import std.stdio, std.algorithm;
void main() {
auto x = "abcd";
writeln(isSorted(x));
auto y = "acbd";
writeln(isSorted(y));
}
Maybe this line:
https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm.d#L9237
for (; !ahead.empty; ahead.popFront(), ++i)
Should be:
for (; !ahead.empty; ahead.popFront(), r.popFront(), ++i)
Comment #1 by bearophile_hugs — 2013-02-05T18:10:44Z
A comment from Brad Anderson:
> Looks like line 9221 is essentially the same code so you may want
> to change that line too.
Comment #2 by bearophile_hugs — 2013-02-06T03:10:17Z
This used to work not too much time ago.
Comment #3 by andrej.mitrovich — 2013-02-12T13:52:58Z