Failed to sort range

Sergei Nosov sergei.nosov at gmail.com
Tue May 28 07:03:48 PDT 2013


On Tuesday, 28 May 2013 at 13:41:19 UTC, bearophile wrote:
> Sergei Nosov:
>
>> That went pretty well, until I tried to sort it. Sorting 
>> function asserted "Failed to sort range of type Array!(int)."
>
> If you take a look a the implementation of Phobos sort, you see 
> there is a recently added runtime test mostly meant to catch 
> wrongly implemented comparison functions, like q{a <= b} 
> instead of q{a < b}. Maybe that's the one that has fired. But I 
> don't know why.
>
> Bye,
> bearophile

I don't think that is the case, since I use the default
comparison function for ints.


More information about the Digitalmars-d-learn mailing list