We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[diff.cpp11.lex] has this example:
#define M(x, ...) __VA_ARGS__ int x[2] = { M(1’2,3’4) }; // int x[2] = {}; — C ++ 2011 // int x[2] = { 3’4 }; — this International Standard
However, that isn't valid C++11, [cpp.replace]/4 says that for a variadic macro:
there shall be more arguments in the invocation than there are parameters in the macro definition (excluding the ...).
...
The text was updated successfully, but these errors were encountered:
I propose this minor rewrite of the example, it still maintains the same intent but is actually valid C++11 and C++14:
#define M(x, ...) __VA_ARGS__ int a[] = { M(1'2, 3'4, 5) }; // int a[] = { 5 }; — C++ 2011 // int a[] = { 3'4, 5 }; — this International Standard
Sorry, something went wrong.
[diff.cpp11.lex] fix example for digit separators
b18bea0
Fixes cplusplus#306.
[diff.cpp11.lex] Fix example for digit separators (#1004)
e974f19
Fixes #306.
No branches or pull requests
[diff.cpp11.lex] has this example:
However, that isn't valid C++11, [cpp.replace]/4 says that for a variadic macro:
The text was updated successfully, but these errors were encountered: