On Tuesday, 30 August 2016 at 11:52:21 UTC, Johannes Pfau wrote:
import std.stdio;

debug
{
    enum writelnPtr = &writeln!string;
    enum void function(string) @nogc writelnNoGC =
        cast(void function(string) @nogc)writelnPtr;
}

void main() @nogc
{
    debug writelnNoGC("foo");
}

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?

Reply via email to