I have a variadic function from a third-party C library:
int func(int argc, ...);
argc
indicates the number of passed optional
The full example on Mehrwolf's answer unfortunately doesn't compile on VS2010 nor it does on VS2015 (i tried it also on this online VS compiler). A different approach on this problem that allows to produce cross-platform code that compiles on a wide range of compilers is using non-standard extensions that are also available in MS compilers as in my answer to a similar question. Also, differently form the cited answer, the result of PP_NARG((a, b, c))
using the extensions (in both MS and gcc/clang compilers) is 1 and not 0.