I need to be able to get the following:
#define MY_MACRO(PARAM1,PARAM2) \
MY_OTHER_MACRO(TYPENAME_OF(PARAM1),PARAMNAME_OF(PARAM1));\
MY_OTHER_MACRO(TYPENAME_OF(PARAM2),PARAMNAME_OF(PARAM2));\
to cause
MY_MACRO(int x,char *z)
to compile as
MY_OTHER_MACRO(int,x);
MY_OTHER_MACRO(char*,z);
or it would not be the end of the world if it compiled as:
MY_OTHER_MACRO(int,x);
MY_OTHER_MACRO(char,*z);
or even this would be ok too: (i can code MY_OTHER_MACRO to work with either result)
MY_OTHER_MACRO(int,x);
MY_OTHER_MACRO(char,z);
alternatively, if there is some way of counting the tokens that are separated by whitespace (and assume that "*" is separate token, i can work with that too - e.g. 2 vs 3) typically, tokens are separated by commas, as far as i know. is there any way to use another character?