summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2019-10-10 13:21:38 (GMT)
committerGennadiy Civil <misterg@google.com>2019-10-10 13:21:38 (GMT)
commitcb1d5db1a104c7161fce89483dcfbe0ccb9bb28b (patch)
treeb58ff93963fe15b329ccdcc141e74dc357ecc5ee
parentcd17fa2abda2a2e4111cdabd62a87aea16835014 (diff)
parent3339b97c6a7fb908cd343ff8251d86782ea264a8 (diff)
downloadgoogletest-cb1d5db1a104c7161fce89483dcfbe0ccb9bb28b.zip
googletest-cb1d5db1a104c7161fce89483dcfbe0ccb9bb28b.tar.gz
googletest-cb1d5db1a104c7161fce89483dcfbe0ccb9bb28b.tar.bz2
Merge pull request #2448 from kuzkry:bad-googletest-export
PiperOrigin-RevId: 273585026
-rw-r--r--googlemock/include/gmock/gmock-matchers.h4
-rw-r--r--googlemock/include/gmock/internal/gmock-internal-utils.h2
-rw-r--r--googlemock/test/gmock-internal-utils_test.cc1
-rw-r--r--googletest/docs/advanced.md2
-rw-r--r--googletest/include/gtest/gtest.h3
5 files changed, 4 insertions, 8 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 28e188b..4428ec1 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -1607,8 +1607,8 @@ class PointeeMatcher {
template <typename Pointer>
class Impl : public MatcherInterface<Pointer> {
public:
- typedef typename PointeeOf<typename std::remove_const<
- typename std::remove_reference<Pointer>::type>::type>::type Pointee;
+ typedef typename PointeeOf<GTEST_REMOVE_REFERENCE_AND_CONST_(Pointer)>::type
+ Pointee;
explicit Impl(const InnerMatcher& matcher)
: matcher_(MatcherCast<const Pointee&>(matcher)) {}
diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h
index fdc049c..d012e71 100644
--- a/googlemock/include/gmock/internal/gmock-internal-utils.h
+++ b/googlemock/include/gmock/internal/gmock-internal-utils.h
@@ -334,8 +334,6 @@ class WithoutMatchers {
// Internal use only: access the singleton instance of WithoutMatchers.
GTEST_API_ WithoutMatchers GetWithoutMatchers();
-// Type traits.
-
// Disable MSVC warnings for infinite recursion, since in this case the
// the recursion is unreachable.
#ifdef _MSC_VER
diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc
index d000e69..19ba6fe 100644
--- a/googlemock/test/gmock-internal-utils_test.cc
+++ b/googlemock/test/gmock-internal-utils_test.cc
@@ -40,7 +40,6 @@
#include <memory>
#include <sstream>
#include <string>
-#include <type_traits>
#include <vector>
#include "gmock/gmock.h"
diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md
index ef20379..179118d 100644
--- a/googletest/docs/advanced.md
+++ b/googletest/docs/advanced.md
@@ -465,7 +465,7 @@ You can call the function
to assert that types `T1` and `T2` are the same. The function does nothing if
the assertion is satisfied. If the types are different, the function call will
fail to compile, the compiler error message will say that
-`type1 and type2 are not the same type` and most likely (depending on the compiler)
+`T1 and T2 are not the same type` and most likely (depending on the compiler)
show you the actual values of `T1` and `T2`. This is mainly useful inside
template code.
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h
index dbe5b1c..37a1762 100644
--- a/googletest/include/gtest/gtest.h
+++ b/googletest/include/gtest/gtest.h
@@ -2298,8 +2298,7 @@ class GTEST_API_ ScopedTrace {
// to cause a compiler error.
template <typename T1, typename T2>
constexpr bool StaticAssertTypeEq() noexcept {
- static_assert(std::is_same<T1, T2>::value,
- "type1 and type2 are not the same type");
+ static_assert(std::is_same<T1, T2>::value, "T1 and T2 are not the same type");
return true;
}