Fixes broken build on VC++ 7.1.

This commit is contained in:
vladlosev
2011-06-13 19:00:37 +00:00
parent 7e29bb7f7e
commit cc265df8b4
7 changed files with 101 additions and 43 deletions

View File

@@ -694,7 +694,10 @@ inline void UniversalTersePrint(char* str, ::std::ostream* os) {
// NUL-terminated string.
template <typename T>
void UniversalPrint(const T& value, ::std::ostream* os) {
UniversalPrinter<T>::Print(value, os);
// A workarond for the bug in VC++ 7.1 that prevents us from instantiating
// UniversalPrinter with T directly.
typedef T T1;
UniversalPrinter<T1>::Print(value, os);
}
#if GTEST_HAS_TR1_TUPLE