On Thursday, 27 August 2015 at 22:09:07 UTC, Jordan Wilson wrote:
Hello,
Just wondering why compiling the following fails with the
-debug switch, but appears to compile and execute fine without
it:
import std.stdio;
import std.algorithm;
import std.container;
int main(string[] args) {
Array!string letters = ["b","a","c"];
sort(letters[]);
writeln (letters[]); // ["a","b","c"]
return 0;
}
With the -debug switch, I get:
src\phobos\std\range\package.d(7180): Error:
'std.range.SortedRange!(RangeT!(Array!string), "a <
b").SortedRange.dbgVerifySorted' is not nothrow
src\phobos\std\algorithm\sorting.d(982): Error: template
instance std.range.assumeSorted!("a < b",
RangeT!(Array!string)) error instantiating
Without the switch, everything seems to work fine...(I'm using
DMD 2.068.0)
Thanks,
Jordan
filed a BR: https://issues.dlang.org/show_bug.cgi?id=14981