Fixes a nasty issue in gtest's template instantiation.

This commit is contained in:
zhanyong.wan
2013-02-28 23:46:07 +00:00
parent b3ed14ac17
commit 6a036a5c8c
9 changed files with 85 additions and 96 deletions

View File

@@ -163,18 +163,6 @@ class UnitTestImpl* GetUnitTestImpl();
void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
const std::string& message);
// Converts a streamable value to an std::string. A NULL pointer is
// converted to "(null)". When the input value is a ::string,
// ::std::string, ::wstring, or ::std::wstring object, each NUL
// character in it is replaced with "\\0".
// Declared in gtest-internal.h but defined here, so that it has access
// to the definition of the Message class, required by the ARM
// compiler.
template <typename T>
std::string StreamableToString(const T& streamable) {
return (Message() << streamable).GetString();
}
} // namespace internal
// The friend relationship of some of these classes is cyclic.