Microsoft Visual Studio Professional 2015バージョン14.0.25431.01更新3は、code belowをコンパイルするときにエラーが発生します。私のバグのように見えます。VCバグ?コンパイラが__VA_ARGS__を数えられない '引数
ありがとうございます。
#include <iostream>
#define A(a, b, c, ...) #__VA_ARGS__
#define B(...) A(__VA_ARGS__)
int main()
{
// warning C4003: not enough actual parameters for macro 'A'
// error C2059: syntax error: ';'
std::cout << B(1, 2, 3, 4); // should print '4'
return 0;
}
[MSVCは '__VA_ARGS__'を正しく展開しません](http://stackoverflow.com/questions/5134523/msvc-doesnt-expand-va-args-correctly) – cpplearner
@cpplearnerありがとうございます。 – ZDF