aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-01-12 15:41:51 -0500
committerGennadiy Civil <misterg@google.com>2019-01-14 17:02:03 -0500
commit9acd065a905a145eaa0a5ccbc43d7fbfd1079faf (patch)
tree212d3ce673eb77f6446a7f43a4ff3d332b49edc0 /googlemock/include/gmock
parent097407fd3cfb4d1e5f89ae242635b1f321b222bb (diff)
downloadgoogletest-9acd065a905a145eaa0a5ccbc43d7fbfd1079faf.tar.gz
googletest-9acd065a905a145eaa0a5ccbc43d7fbfd1079faf.tar.bz2
googletest-9acd065a905a145eaa0a5ccbc43d7fbfd1079faf.zip
Googletest export
Add move-only argument support to almost all remaining matchers. PiperOrigin-RevId: 229030728
Diffstat (limited to 'googlemock/include/gmock')
-rw-r--r--googlemock/include/gmock/gmock-matchers.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 56804f39..2cb70286 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>