Googletest export

Add printer for std::type_info.

PiperOrigin-RevId: 408375407
This commit is contained in:
Abseil Team
2021-11-08 13:12:33 -05:00
committed by dinord
parent d4e084a1cc
commit c3792825bf
2 changed files with 16 additions and 0 deletions

View File

@@ -591,6 +591,12 @@ inline void PrintTo(internal::StringView sp, ::std::ostream* os) {
inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; }
#if GTEST_HAS_RTTI
inline void PrintTo(const std::type_info& info, std::ostream* os) {
*os << internal::GetTypeName(info);
}
#endif // GTEST_HAS_RTTI
template <typename T>
void PrintTo(std::reference_wrapper<T> ref, ::std::ostream* os) {
UniversalPrinter<T&>::Print(ref.get(), os);