aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2018-01-03 14:15:14 -0500
committerGitHub <noreply@github.com>2018-01-03 14:15:14 -0500
commit26addade175b5d576eee788719367719d235350f (patch)
treeb60d37f8eb4f03a02bfeb113822ba1dfb6862e79
parenta9fa67cbe49578fe7b2dd01a92fc9b7d045b4830 (diff)
parentba6ecedede74521490f36b6aea08f91fdad6d201 (diff)
downloadgoogletest-26addade175b5d576eee788719367719d235350f.tar.gz
googletest-26addade175b5d576eee788719367719d235350f.tar.bz2
googletest-26addade175b5d576eee788719367719d235350f.zip
Merge branch 'master' into fix-issue-776-support-autoconf-as-submodule
-rw-r--r--googletest/include/gtest/gtest-printers.h9
-rw-r--r--googletest/include/gtest/internal/gtest-port.h2
2 files changed, 3 insertions, 8 deletions
diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h
index 282a2dac..38c63d25 100644
--- a/googletest/include/gtest/gtest-printers.h
+++ b/googletest/include/gtest/gtest-printers.h
@@ -427,13 +427,8 @@ void DefaultPrintTo(WrapPrinterType<kPrintFunctionPointer> /* dummy */,
*os << "NULL";
} else {
// T is a function type, so '*os << p' doesn't do what we want
- // (it just prints p as bool). We want to print p as a const
- // void*. However, we cannot cast it to const void* directly,
- // even using reinterpret_cast, as earlier versions of gcc
- // (e.g. 3.4.5) cannot compile the cast when p is a function
- // pointer. Casting to UInt64 first solves the problem.
- *os << reinterpret_cast<const void*>(
- reinterpret_cast<internal::UInt64>(p));
+ // (it just prints p as bool). Cast p to const void* to print it.
+ *os << reinterpret_cast<const void*>(p);
}
}
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 5d1b141d..8778bddd 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -827,7 +827,7 @@ using ::std::tuple_size;
// Determines whether to support Combine().
// The implementation doesn't work on Sun Studio since it doesn't
// understand templated conversion operators.
-#if GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC)
+#if (GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_) && !defined(__SUNPRO_CC)
# define GTEST_HAS_COMBINE 1
#endif