www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20260] New: CustomFloat with 0 precision/exponentWidth

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

          Issue ID: 20260
           Summary: CustomFloat with 0 precision/exponentWidth
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: dlang croco-puzzle.com

Both cases should be caught by template-constraint:

unittest
{
    auto a = CustomFloat!(0, 7)(0.0);
    auto b = CustomFloat!(7, 0)(0.0);
}

--
Oct 02 2019