Created
January 10, 2018 15:24
-
-
Save cor3ntin/c007738915ba90c719452e553ab2989f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constexpr { | |
bool debug = /*...*/; | |
log->(std::meta::expression<const char*> c, std::meta::expression<>... args) { | |
if(debug) { | |
-> { | |
printf(->c, (->args)...); | |
}; | |
} | |
} | |
} | |
void foo() { | |
log("Hello %", "World"); //expand to printf("Hello World") only and only if debug is true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment