@nogc
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 11 00:45:23 PDT 2014
Joseph Rushton Wakeling:
> I've habitually used 'format' to prepare assert messages with
> variable content, which has a similar problem -- IIRC it
> conflicts with nothrow and I guess it too would conflict with
> @nogc.
A solution is to add to Phobos a way to format to an output
range, where the range you use a stack-allocated array of chars
large enough to contain your formatted message. So on the whole
it can be @nogc.
Bye,
bearophile
More information about the Digitalmars-d
mailing list