@nogc formattedWrite

Igor stojkovic.igor at gmail.com
Mon Oct 9 09:30:19 UTC 2017


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 it's 
> compatible with betterC. Also, you might check out Ocean, which 
> might have nogc formatting.
> https://github.com/sociomantic-tsunami/ocean

As far as I know sformat is still not @nogc because it may throw 
an exception if buffer is not large enough, and throwing 
exceptions requires allocation.


More information about the Digitalmars-d-learn mailing list