Failed to sort range

bearophile bearophileHUGS at lycos.com
Tue May 28 06:41:18 PDT 2013


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


More information about the Digitalmars-d-learn mailing list