[Issue 13055] New: @nogc std.string.sformat
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jul 6 06:13:39 PDT 2014
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 at puremagic.com
Reporter: bearophile_hugs at 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.
--
More information about the Digitalmars-d-bugs
mailing list