Variadic macro trick

前端 未结 3 1723

What\'s the trick to create a variadic macro FOO(a1, a2, a3,..., an) such that it expands to FOOn(a1, a2, a3,..., an) for values of n

3条回答
  •  时光取名叫无心
    2020-11-27 21:12

    This post Variadic macro to count number of arguments has what you're looking for I believe. Look at the first and second responses.

提交回复
热议问题