<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">The code snippet below doesn't work. Is there a way to make it work?</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">import std.stdio;</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">void main(){</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
writelnIfNonVoid(writeln("ok"));</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">}</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">void writelnIfNonVoid(T...)(T a){</div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"> static if(T.length)</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"> writeln(a);</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
}</div></div>