summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/gtest-printers.h
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2018-06-04 10:45:56 -0400
committerGennadiy Civil <misterg@google.com>2018-06-04 10:45:56 -0400
commitf66ab00704cd47e4e63ef6d425ca14b9192aaebb (patch)
tree4f9b894af382f02a8483ba595095e10e89a841b0 /googletest/include/gtest/gtest-printers.h
parentdb5f9ec567daff3beba53fd0bcd98e3f3562404c (diff)
downloadgoogletest-f66ab00704cd47e4e63ef6d425ca14b9192aaebb.tar.gz
googletest-f66ab00704cd47e4e63ef6d425ca14b9192aaebb.zip
Upstream, cl/199129756
Add printer for std::nullptr_t, addressing https://github.com/google/googletest/issues/1616
Diffstat (limited to 'googletest/include/gtest/gtest-printers.h')
-rw-r--r--googletest/include/gtest/gtest-printers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h
index e53963b4..373946b9 100644
--- a/googletest/include/gtest/gtest-printers.h
+++ b/googletest/include/gtest/gtest-printers.h
@@ -636,6 +636,10 @@ inline void PrintTo(absl::string_view sp, ::std::ostream* os) {
}
#endif // GTEST_HAS_ABSL
+#if GTEST_LANG_CXX11
+inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; }
+#endif // GTEST_LANG_CXX11
+
#if GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_
// Helper function for printing a tuple. T must be instantiated with
// a tuple type.
OpenPOWER on IntegriCloud