Am Tue, 06 Sep 2016 05:02:54 +0000
schrieb timepp <[email protected]>:
> On Sunday, 4 September 2016 at 04:24:34 UTC, rikki cattermole
> wrote:
> > void writeln(T...)(T args) {
> > if (__ctfe){
> > debug {
> > __ctfeWriteln(args);
> > }
> > } else {
> > // ... current implementation
> > }
> > }
> >
> > Are you sureeeee?
> any usage example?
>
> consider a normal usage:
> writeln("done.");
>
> I just want a runtime output. how can I tell the compiler not to
> print "done." at compile time?
If you actually call a function during compile-time that uses
writeln and want it to be silent you would write:
if (!__ctfe) writeln("done.");
--
Marco