[Issue 17628] New: formattedWrite is impure on double

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 9 13:47:42 PDT 2017


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

          Issue ID: 17628
           Summary: formattedWrite is impure on double
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: qs.il.paperinik at gmail.com

pure void main()
{
    import std.format : formattedWrite;
    auto app = appender!string;
    app.formattedWrite!"%s"(1.0);
}

fails. formattedWrite can purely do its job for int and string. It should also
do for floating point types.

--


More information about the Digitalmars-d-bugs mailing list