plans for macros

BCS ao at
Wed May 14 09:30:06 PDT 2008

Reply to Steven,

> If I have a log object, and that log object is supposed to evaluate
> its arguments only if the logging level allows it, checked at runtime.

as a bit of an aside: this can be done using lazy

void Log(uint level)(lazy char[] str)
  if(current > level) RealLog.output(str());

alias Log!(Critical) CriticalLog;
alias Log!(Debug) DebugLog;

More information about the Digitalmars-d-learn mailing list