c preprocessor - Simple tuple operation -
say have tuple:
#define t (a, b) how can extract first , second element of tuple in gcc, without use of external libraries?
i found 1 way of doing this. i'm not sure if work in else gcc.
#define first_(x, y) x #define first(t) first_ t #define second_(x, y) y #define second(t) second_ t #define t (a, b) first(t) // expands second(t) // expands b
Comments
Post a Comment