Debug prints in @nogc

Cauterite via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 30 09:37:53 PDT 2016


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


More information about the Digitalmars-d-learn mailing list