How do I implement no-op macro in C++?
#include #ifdef NOOP #define conditional_noop(x) what goes here? #else #
While leaving it blank is the obvious option, I'd go with
#define conditional_noop(x) do {} while(0)
This trick is obviously no-op, but forces you to write a semicolon after conditional_noop(123).
conditional_noop(123)