Skip to content

Instantly share code, notes, and snippets.

@sinkuu
Created July 4, 2014 11:09
Show Gist options
  • Save sinkuu/b8d648e39a26fdf116d5 to your computer and use it in GitHub Desktop.
Save sinkuu/b8d648e39a26fdf116d5 to your computer and use it in GitHub Desktop.
import std.stdio;
void debugWriteln(T...)(T args) pure @trusted nothrow
{
debug
{
try writeln(args); catch assert(false);
}
}
void main() pure @safe nothrow
{
debugWriteln("hello! ", 123);
}
@sinkuu
Copy link
Author

sinkuu commented Jul 5, 2014

こちらの方がスマートですね。 https://twitter.com/9rnsr/status/485128644419809280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment