digitalmars.D.bugs - [Issue 13055] New: nogc std.string.sformat
- via Digitalmars-d-bugs (22/22) Jul 06 2014 https://issues.dlang.org/show_bug.cgi?id=13055
https://issues.dlang.org/show_bug.cgi?id=13055 Issue ID: 13055 Summary: nogc std.string.sformat Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: Phobos Assignee: nobody puremagic.com Reporter: bearophile_hugs eml.cc sformat uses the given buffer, so this should compile: void main() nogc { import std.string: sformat; char[50] arr; sformat(arr, "%d", 100); } If the given buffer is not large enough, sformat throws an exception. I think throwing this exception should not require a GC memory allocation at run-time. --
Jul 06 2014