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.

That function exists already, it just needs to become @nogc, I even filed a ER on this:
https://d.puremagic.com/issues/show_bug.cgi?id=13055

Bye,
bearophile

Reply via email to