Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有一个元组:
#define T (a, b)
如何在不使用任何外部库的情况下提取 gcc 中元组的第一个和第二个元素?
我找到了一种方法。我不确定这是否适用于 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 to a second(T) // expands to b