-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
Fully Compatible
We currently make use of the GCC extension that gives special behavior to the token pasted ##_VA_ARGS_ expression, such that the comma before the ## is elided:
http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html
While this extension is widely honored by other compilers, C99 actually introduced a specification for variadic macros, and that specification does not honor this construction.
As a result, when we compile with -std=c++11 we get the C99 version of variadic macros rather than the GNU version, so the commas are no longer elided as our macros expcet and the mongo initializer stuff breaks.
In the interest of avoiding non-portable compiler extensions, even if widely implemented in other compilers, we should avoid using the token-pasting trick and find another way to make the mongo initializer macros work.