Hi!
While you can do this already with macro trickery, it requires some very unreadable code. I'd like to be able to extract that information directly in a way similar to how __VA_OPT__()
works.
#define foo(a, b, ...) __VA_COUNT__
foo(a, b, c, d)
The code above would expand to
#define bar(...) __VA_COUNT__
bar() // 0
bar(x) // 1
Could this be added as a Clang extension?
Cc: @AaronBallman