Am Tue, 30 Aug 2016 16:37:53 +0000 schrieb Cauterite <cauter...@gmail.com>:
> On Tuesday, 30 August 2016 at 14:38:47 UTC, Nordlöw wrote: > > Just being able to print a string is not good enough. I want > > the variadic part writeln so I can debug-print values in my > > buggy code. Do you have a similar solution? > > Take a look at the example here: > http://dlang.org/phobos/std_traits#SetFunctionAttributes > You could make a `assumeNogc` template similar to the example > `assumePure`. > > Oh yeah, here's one I prepared earlier: > https://dpaste.dzfl.pl/254a5c2697a7 Nice! Here's a slightly modified version: https://dpaste.dzfl.pl/8c5ec90c5b39 This version does not need an additional delegate. It can be used like this: assumeNogc!writefln("foo %s", 42); assumeNogc!writeln("foo", 42);