www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13663] New: Comparison of Tuples with floating point fields

https://issues.dlang.org/show_bug.cgi?id=13663

          Issue ID: 13663
           Summary: Comparison of Tuples with floating point fields
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: r.97all gmail.com

A Tuple with only component nan is greater than itself.

unittest
{
    import std.typecons;
    real x;
    auto t = tuple(x);
    assert (t > t);
    assert (!(t < t));
}

--
Oct 29 2014