How to sort a range
Edwin van Leeuwen via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Mar 9 07:49:45 PST 2016
On Wednesday, 9 March 2016 at 15:39:55 UTC, rcorre wrote:
> On Wednesday, 9 March 2016 at 14:28:11 UTC, cym13 wrote:
>
> Still curious as to why it fails; maybe the range is getting
> copied at some point? I guess I need to step through it.
>
> I did try different SwapStrategies with no luck.
Since you are adapting phobos anyway you could try commenting out
the assert and see what the result of the sort is. That might
give you some clue:
//assert(isSorted!lessFun(r), "Failed to sort range of type " ~
Range.stringof);
Also I notice the line numbering is different in my sorted.d
file. Did you test the latest version of dmd/phobos?
More information about the Digitalmars-d-learn
mailing list