Hi,
I have a macro of the form:
#define MACRONAME (expr) OTHER_MACRO_TO_CALL (expr)
however I only want the macro OTHER_MACRO_TO_CALL to be called if a certain token is already defined. For example something like this:
#define MACRONAME (expr) \
#ifdef MY_TOKEN \
OTHER_MACRO_TO_CALL (expr) \
#endif
This however doesn't work. Is there any way of doing this? Any help would be much appreciated. Thanks.
I have a macro of the form:
#define MACRONAME (expr) OTHER_MACRO_TO_CALL (expr)
however I only want the macro OTHER_MACRO_TO_CALL to be called if a certain token is already defined. For example something like this:
#define MACRONAME (expr) \
#ifdef MY_TOKEN \
OTHER_MACRO_TO_CALL (expr) \
#endif
This however doesn't work. Is there any way of doing this? Any help would be much appreciated. Thanks.