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

          Issue ID: 18258
           Summary: std.math.NaN redesign
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: [email protected]
          Reporter: [email protected]

The current signature allows creation only for real NaNs with payloads. It's
impossible to create float or double NaNs with a payload.

Proposal:

Redesign NaN to allow creation of other floating point types:
T NaN(T = real, U)(const U payload) if (isFloatingPoint!T && isUnsigned!U)

--

Reply via email to