Preprocessor directives are handled before the code is actually compiled so you can't use C++ language constructs to influence the preprocessing process. You could use an #if directive but then you can only check simple things, like comparing values of macros, in the condition.