Re: @nogc formattedWrite

2017-10-09 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Saturday, 7 October 2017 at 18:14:00 UTC, Nordlöw wrote: Is it currently possible to somehow do @nogc formatted output to string? I'm currently using my `pure @nogc nothrow` array-container `CopyableArray` as @safe pure /*TODO nothrow @nogc*/ unittest { import std.format :

Re: @nogc formattedWrite

2017-10-09 Thread Igor via Digitalmars-d-learn
On Saturday, 7 October 2017 at 18:27:36 UTC, jmh530 wrote: On Saturday, 7 October 2017 at 18:14:00 UTC, Nordlöw wrote: It would be nice to be able to formatted output in -betterC... Agreed. If you know the size of the buffer, you can use sformat, which might be @nogc, but I don't know if

Re: @nogc formattedWrite

2017-10-07 Thread jmh530 via Digitalmars-d-learn
On Saturday, 7 October 2017 at 18:14:00 UTC, Nordlöw wrote: It would be nice to be able to formatted output in -betterC... Agreed. If you know the size of the buffer, you can use sformat, which might be @nogc, but I don't know if it's compatible with betterC. Also, you might check out

@nogc formattedWrite

2017-10-07 Thread Nordlöw via Digitalmars-d-learn
Is it currently possible to somehow do @nogc formatted output to string? I'm currently using my `pure @nogc nothrow` array-container `CopyableArray` as @safe pure /*TODO nothrow @nogc*/ unittest { import std.format : formattedWrite; const x = "42"; alias A = CopyableArray!(char);