Searched defs:binary_counting_predicate (Results 1 – 1 of 1) sorted by relevance
31 struct binary_counting_predicate : public std::binary_function<Arg1, Arg2, bool> { struct34 binary_counting_predicate ( Predicate p ) : p_(p), count_(0) {} in binary_counting_predicate() argument35 ~binary_counting_predicate() {} in ~binary_counting_predicate() argument37 bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); } in operator ()()38 size_t count() const { return count_; } in count()39 void reset() { count_ = 0; } in reset()42 Predicate p_;43 mutable size_t count_;