diff options
author | Abseil Team <absl-team@google.com> | 2019-01-12 20:41:51 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2019-01-14 22:02:03 (GMT) |
commit | 9acd065a905a145eaa0a5ccbc43d7fbfd1079faf (patch) | |
tree | 212d3ce673eb77f6446a7f43a4ff3d332b49edc0 /googlemock/include/gmock/gmock-matchers.h | |
parent | 097407fd3cfb4d1e5f89ae242635b1f321b222bb (diff) | |
download | googletest-9acd065a905a145eaa0a5ccbc43d7fbfd1079faf.zip googletest-9acd065a905a145eaa0a5ccbc43d7fbfd1079faf.tar.gz googletest-9acd065a905a145eaa0a5ccbc43d7fbfd1079faf.tar.bz2 |
Googletest export
Add move-only argument support to almost all remaining matchers.
PiperOrigin-RevId: 229030728
Diffstat (limited to 'googlemock/include/gmock/gmock-matchers.h')
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 56804f3..2cb7028 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -900,7 +900,7 @@ class PairMatchBase { public: template <typename T1, typename T2> operator Matcher<::std::tuple<T1, T2>>() const { - return MakeMatcher(new Impl<::std::tuple<T1, T2>>); + return Matcher<::std::tuple<T1, T2>>(new Impl<const ::std::tuple<T1, T2>&>); } template <typename T1, typename T2> operator Matcher<const ::std::tuple<T1, T2>&>() const { @@ -2535,7 +2535,8 @@ class KeyMatcher { template <typename PairType> operator Matcher<PairType>() const { - return MakeMatcher(new KeyMatcherImpl<PairType>(matcher_for_key_)); + return Matcher<PairType>( + new KeyMatcherImpl<const PairType&>(matcher_for_key_)); } private: @@ -2640,9 +2641,8 @@ class PairMatcher { template <typename PairType> operator Matcher<PairType> () const { - return MakeMatcher( - new PairMatcherImpl<PairType>( - first_matcher_, second_matcher_)); + return Matcher<PairType>( + new PairMatcherImpl<const PairType&>(first_matcher_, second_matcher_)); } private: @@ -3205,7 +3205,7 @@ class OptionalMatcher { template <typename Optional> operator Matcher<Optional>() const { - return MakeMatcher(new Impl<Optional>(value_matcher_)); + return Matcher<Optional>(new Impl<const Optional&>(value_matcher_)); } template <typename Optional> |