passing all writefln arguments
Saaa
empty at needmail.com
Thu Mar 20 16:21:21 PDT 2008
Thanks,
As I think that changing a variable is easier than changing the compiler
line I went with:
const bool DEBUGG=false;
static if (DEBUGG == true) {
alias writefln dWritefln;
}
else {
void dWritefln(...) {}
}
Will dWritefln(..){} compile to 'nothing'?
I mean, will calling dWritefln when DEBUGG=false take no cpu tick (does the
compiler see that it does nothing)?
>
> Easier if you turn it inside out.
>
> debug(DEBUGG) {
> alias writefln dWritefln;
> }
> else {
> void dWritefln(...) {}
> }
>
> --bb
More information about the Digitalmars-d-learn
mailing list