change mixins

Pelle Månsson pelle.mansson at gmail.com
Mon Feb 15 14:37:16 PST 2010


On 02/15/2010 10:53 PM, sybrandy wrote:
> In short: I'm using mixins so that the person who's using the library
> doesn't have to put in version(DoLogging)... all over the place.  By
> containing it in one location, I was trying to keep the code using the
> library cleaner.
void trace(string s) {
     version (NoTrace) {
         //do nothing
     } else {
         //do tracing
     }
}

trace("Stuff");

will this not work?



More information about the Digitalmars-d mailing list