diff options
Diffstat (limited to 'googlemock')
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 5 | ||||
-rw-r--r-- | googlemock/include/gmock/gmock-spec-builders.h | 4 | ||||
-rw-r--r-- | googlemock/include/gmock/internal/gmock-internal-utils.h | 4 | ||||
-rw-r--r-- | googlemock/test/gmock-internal-utils_test.cc | 12 |
4 files changed, 4 insertions, 21 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index fa50903..7009215 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -1607,9 +1607,8 @@ class PointeeMatcher { template <typename Pointer> class Impl : public MatcherInterface<Pointer> { public: - typedef - typename PointeeOf<typename std::remove_const<GTEST_REMOVE_REFERENCE_( - Pointer)>::type>::type Pointee; + typedef typename PointeeOf<typename std::remove_const< + typename std::remove_reference<Pointer>::type>::type>::type Pointee; explicit Impl(const InnerMatcher& matcher) : matcher_(MatcherCast<const Pointee&>(matcher)) {} diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index 0d1adda..66429df 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<T>&). The behavior of calling this after - // calling Unwrap on the same object is unspecified. + // const std::add_lvalue_reference<T>::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 1770d5e..53b6d97 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<T>::type removes the reference from type T, if any. -template <typename T> struct remove_reference { typedef T type; }; // NOLINT -template <typename T> struct remove_reference<T&> { typedef T type; }; // NOLINT - // 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 67b7077..7df4078 100644 --- a/googlemock/test/gmock-internal-utils_test.cc +++ b/googlemock/test/gmock-internal-utils_test.cc @@ -506,18 +506,6 @@ TEST(LogTest, OnlyWarningsArePrintedWhenVerbosityIsInvalid) { TestLogWithSeverity("invalid", kWarning, true); } -#endif // GTEST_HAS_STREAM_REDIRECTION - -TEST(TypeTraitsTest, remove_reference) { - EXPECT_TRUE((std::is_same<char, remove_reference<char&>::type>::value)); - EXPECT_TRUE( - (std::is_same<const int, remove_reference<const int&>::type>::value)); - EXPECT_TRUE((std::is_same<int, remove_reference<int>::type>::value)); - EXPECT_TRUE((std::is_same<double*, remove_reference<double*>::type>::value)); -} - -#if GTEST_HAS_STREAM_REDIRECTION - // Verifies that Log() behaves correctly for the given verbosity level // and log severity. std::string GrabOutput(void(*logger)(), const char* verbosity) { |