plans for macros
schveiguy at yahoo.com
Thu May 15 10:57:55 PDT 2008
Yes, but turning on debug levels is a compile-time thing. Many times, you
want to log based on a run-time decision, i.e. a command line switch.
Your solution does not work in this case.
I use nearly that exact syntax in my project:
debug Log(5, "blar", 10.0f);
The Log function is built using a simple template:
void Log(T...)(T t)
As far as syntax goes that's in my opinion pretty nice. And the function
isn't even called if debug is off. You can easily adapt it to work with
So, this is in my opinion a problem that doesn't really need macro's to
More information about the Digitalmars-d-learn