Googletest export

Deduplicate testing::ReferenceWrapper with std::reference_wrapper.
Minor cleanups in matchers_test.

PiperOrigin-RevId: 229022872
This commit is contained in:
Abseil Team
2019-01-12 12:26:37 -05:00
committed by Gennadiy Civil
parent 0599a7b841
commit 097407fd3c
5 changed files with 19 additions and 105 deletions

View File

@@ -637,8 +637,7 @@ inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; }
template <typename T>
void PrintTo(std::reference_wrapper<T> ref, ::std::ostream* os) {
// Delegate to wrapped value.
PrintTo(ref.get(), os);
UniversalPrinter<T&>::Print(ref.get(), os);
}
// Helper function for printing a tuple. T must be instantiated with