| 44 | } |
| 45 | |
| 46 | bool MatchAndExplain(const PtrPair& pair, |
| 47 | testing::MatchResultListener* listener) const override { |
| 48 | const auto& first = *std::get<0>(pair); |
| 49 | const auto& second = *std::get<1>(pair); |
| 50 | const bool match = first.Equals(second); |
| 51 | *listener << "whose pointees " << testing::PrintToString(first) << " and " |
| 52 | << testing::PrintToString(second) |
| 53 | << (match ? " are equal" : " are not equal"); |
| 54 | return match; |
| 55 | } |
| 56 | }; |
| 57 | |
| 58 | return testing::Matcher<PtrPair>(new Impl()); |