How do I implement no-op macro in C++?
#include
#ifdef NOOP
#define conditional_noop(x) what goes here?
#else
#
As this is a macro, you should also consider a case like
if (other_cond)
conditional_noop(123);
to be on the safe side, you can give an empty statement like
#define conditional_noop(X) {}
for older C sometimes you need to define the empty statment this way (should also get optimized away):
#define conditional_noop(X) do {} while(0)