I want to use a macro to define another macro in C++. Were the macro to define the macro has two arguments, one the name of a macro to do an "#ifdef" test on, the other the name of the new macro to #define. This example is pared down. The real situation is complicated which is why I want to factor it out.
#define TEST_ME // or NOT
#define DEFINE_A_MACRO( _test_me_, _define_me_ ) \
\
#ifdef (actual value of)_test_me_ \
#define (actual value of _define_me_) One Thing \
#else \
#define (actual value of _define_me_) Another Thing \
#endif
...
DEFINE_A_MACRO( TEST_ME, DEFINE_ME )
Is there any way to do this ? I doubt it but might as well pose the question :)