I\'m trying to build googletest with Visual C++ 11, but following code causes an error
template
In Visual Studio 2012 (VC11) _VARIADIC_MAX
is by default defined as 5 in header
:
#if !defined(_VARIADIC_MAX)
#define _VARIADIC_MAX 5
#elif _VARIADIC_MAX < 5 || 10 < _VARIADIC_MAX
#error _VARIADIC_MAX must be between 5 and 10, inclusive
#endif /* !defined(_VARIADIC_MAX) */
if you have multiple VC11 projects include
in a solution, it is better to set the macro to all by
1) Shift click to select all C++ projects in your solution
2) Properties, C/C++, Preprocessor, All Configurations All Platforms, Preprocessor Definitions,
3) add before
a row
_VARIADIC_MAX=10;
You can change 10 to any number in 6~10.