July 06, 2014 [Issue 13055] New: @nogc std.string.sformat | ||||
---|---|---|---|---|
| ||||
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. -- |
Copyright © 1999-2021 by the D Language Foundation