Bug 18832 – std.typecons.tuple comparison broken for floating point elements

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-05-06T12:42:56Z
Last change time
2019-12-21T09:21:38Z
Assigned to
No Owner
Creator
Bolpat

Comments

Comment #0 by qs.il.paperinik — 2018-05-06T12:42:56Z
This code compiles: import std.typecons : tuple; auto tup = tuple(double.nan); assert(tup > tup); assert(!(tup < tup)); What else to say. Comparison is broken. Unfortunately in D, non-total orders are generally broken.
Comment #1 by bugzilla — 2019-12-21T09:21:38Z
*** This issue has been marked as a duplicate of issue 13663 ***