This is not possible. The preprocessor is just a very simple thing, it does not parse nested macros like that. The second pound (#
) would not be understood as a nested macro by the preprocessor. The argument is pretty much handled as raw string.
You could however look into static assert with C++11 and on instead of your #error
directive. You would be writing then something like this:
#ifdef INITED
#define MyMacro(x) x->method(); //something with x
#else
#define MyMacro(x) static_assert(false, "Not initalized!");
#endif