I'm trying to build googletest with Visual C++ 11, but following code causes an error
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9>
void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t, // <-- error C2977
::std::ostream* os) {
PrintTupleTo(t, os);
}
That's an error text:
f:\gtest-1.6.0\include\gtest\gtest-printers.h(550): error C2977: 'std::tuple' : too many template arguments
c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(72) : see declaration of 'std::tuple'
And there is the line 72 of utility
-file:
template<class = _Nil, _MAX_CLASS_LIST>
class tuple; // Line 72
What is the problem with std::tuple
and how to fix it?
(BTW: I'm tried unsuccessfully to change std::tr1::tuple
to std::tuple
)
To use GoogleTest in Visual Studio 2012, you should set _VARIADIC_MAX=10 under Properties->C/C++->Preprocessor->PreprocessorDefinitions on the projects that use it. else you might encounter with below error error C2977: 'std::tuple' : too many template arguments