opCmp, [partial/total/pre]orders, custom floating point types etc.
Fool via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jan 12 13:15:33 PST 2016
On Tuesday, 12 January 2016 at 21:06:40 UTC, John Colvin wrote:
> On Tuesday, 12 January 2016 at 19:50:57 UTC, Fool wrote:
>> By the way, that implies that the result of sorting an array
>> of float by default comparison is undefined unless the array
>> does not contain NaN.
>
> Didn't think of that. Yikes. Should we change the default
> predicate of std.algorithm.sort to std.math.cmp when
> ElementType!R is floating point?
That depends on whether marketing decides to emphasize safety
over performance.
I'm glad that I'm not in charge! ;-)
More information about the Digitalmars-d
mailing list