From ab8f346b076f76f7770f33437fb5823fa444cb80 Mon Sep 17 00:00:00 2001 From: kuzkry Date: Thu, 29 Aug 2019 14:38:09 -0400 Subject: Googletest export Merge 7f4f58da20e1066a888d3e4bcbef541db798a605 into 90a443f9c2437ca8a682a1ac625eba64e1d74a8a Closes #2395 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2395 from kuzkry:custom-type-traits-remove_reference 7f4f58da20e1066a888d3e4bcbef541db798a605 PiperOrigin-RevId: 266189044 --- googlemock/include/gmock/gmock-matchers.h | 5 ++--- googlemock/include/gmock/gmock-spec-builders.h | 4 ++-- googlemock/include/gmock/internal/gmock-internal-utils.h | 4 ---- 3 files changed, 4 insertions(+), 9 deletions(-) (limited to 'googlemock/include') diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index fa50903b..70092157 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -1607,9 +1607,8 @@ class PointeeMatcher { template class Impl : public MatcherInterface { public: - typedef - typename PointeeOf::type>::type Pointee; + typedef typename PointeeOf::type>::type>::type Pointee; explicit Impl(const InnerMatcher& matcher) : matcher_(MatcherCast(matcher)) {} diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index 0d1adda5..66429dfa 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -1320,8 +1320,8 @@ class ReferenceOrValueWrapper { // Provides nondestructive access to the underlying value/reference. // Always returns a const reference (more precisely, - // const RemoveReference&). The behavior of calling this after - // calling Unwrap on the same object is unspecified. + // const std::add_lvalue_reference::type). The behavior of calling this + // after calling Unwrap on the same object is unspecified. const T& Peek() const { return value_; } diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index 1770d5e7..53b6d976 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -336,10 +336,6 @@ GTEST_API_ WithoutMatchers GetWithoutMatchers(); // Type traits. -// remove_reference::type removes the reference from type T, if any. -template struct remove_reference { typedef T type; }; // NOLINT -template struct remove_reference { typedef T type; }; // NOLINT - // Disable MSVC warnings for infinite recursion, since in this case the // the recursion is unreachable. #ifdef _MSC_VER -- cgit v1.2.3