aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/gtest-printers.h
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/include/gtest/gtest-printers.h')
-rw-r--r--googletest/include/gtest/gtest-printers.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h
index 39c5c463..fad4e692 100644
--- a/googletest/include/gtest/gtest-printers.h
+++ b/googletest/include/gtest/gtest-printers.h
@@ -449,7 +449,7 @@ void DefaultPrintTo(WrapPrinterType<kPrintContainer> /* dummy */,
template <typename T>
void DefaultPrintTo(WrapPrinterType<kPrintPointer> /* dummy */,
T* p, ::std::ostream* os) {
- if (p == NULL) {
+ if (p == nullptr) {
*os << "NULL";
} else {
// T is not a function type. We just call << to print p,
@@ -461,7 +461,7 @@ void DefaultPrintTo(WrapPrinterType<kPrintPointer> /* dummy */,
template <typename T>
void DefaultPrintTo(WrapPrinterType<kPrintFunctionPointer> /* dummy */,
T* p, ::std::ostream* os) {
- if (p == NULL) {
+ if (p == nullptr) {
*os << "NULL";
} else {
// T is a function type, so '*os << p' doesn't do what we want
@@ -518,11 +518,7 @@ void PrintTo(const T& value, ::std::ostream* os) {
? kPrintContainer
: !is_pointer<T>::value
? kPrintOther
-#if GTEST_LANG_CXX11
: std::is_function<typename std::remove_pointer<T>::type>::value
-#else
- : !internal::ImplicitlyConvertible<T, const void*>::value
-#endif
? kPrintFunctionPointer
: kPrintPointer > (),
value, os);
@@ -639,8 +635,6 @@ 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)"; }
template <typename T>
@@ -649,8 +643,6 @@ void PrintTo(std::reference_wrapper<T> ref, ::std::ostream* os) {
PrintTo(ref.get(), os);
}
-#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.
@@ -914,7 +906,7 @@ template <>
class UniversalTersePrinter<const char*> {
public:
static void Print(const char* str, ::std::ostream* os) {
- if (str == NULL) {
+ if (str == nullptr) {
*os << "NULL";
} else {
UniversalPrint(std::string(str), os);
@@ -934,7 +926,7 @@ template <>
class UniversalTersePrinter<const wchar_t*> {
public:
static void Print(const wchar_t* str, ::std::ostream* os) {
- if (str == NULL) {
+ if (str == nullptr) {
*os << "NULL";
} else {
UniversalPrint(::std::wstring(str), os);