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.
Missing: import std.array : appender; Seems to be impure because it calls snprintf (which I think may change FPU flags or something).
> which I think may change FPU flags or something A hack would to create a pureSnprintf which resets errno to the value before its execution. There are talks about doing this for free: https://github.com/dlang/druntime/pull/1836
Since `pureMalloc`, `pureCalloc` and `pureFree` got accepted[0], maybe we could do the same for `sprintf` and `snprintf`? [0] - https://github.com/dlang/druntime/pull/1836
*** Issue 15321 has been marked as a duplicate of this issue. ***
*** This issue has been marked as a duplicate of issue 7438 ***