template <typename M>

class MatcherAsPredicate

Defined at line 1600 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

Used for implementing Matches(matcher), which turns a matcher into

a predicate.

Public Methods

void MatcherAsPredicate<M> (M matcher)

Defined at line 1602 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

template <typename T>
bool operator() (const T & x)

This template operator() allows Matches(m) to be used as a

predicate on type T where m is a matcher on type T.

The argument x is passed by reference instead of by value, as

some matcher may be interested in its address (e.g. as in

Matches(Ref(n))(x)).

Defined at line 1611 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h