summaryrefslogtreecommitdiff
path: root/test/support/counting_predicates.hpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:47:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:47:26 +0000
commit51072bd6bf79ef2bc6a922079bff57c31c1effbc (patch)
tree91a2effbc9e6f80bdbbf9eb70e06c51ad0867ea0 /test/support/counting_predicates.hpp
parentbb5e33f003797b67974a8893f7f2930fc51b8210 (diff)
Notes
Diffstat (limited to 'test/support/counting_predicates.hpp')
-rw-r--r--test/support/counting_predicates.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/support/counting_predicates.hpp b/test/support/counting_predicates.hpp
index aab6a9785772..2bd1426934e5 100644
--- a/test/support/counting_predicates.hpp
+++ b/test/support/counting_predicates.hpp
@@ -16,11 +16,11 @@ struct unary_counting_predicate : public std::unary_function<Arg, bool> {
public:
unary_counting_predicate(Predicate p) : p_(p), count_(0) {}
~unary_counting_predicate() {}
-
+
bool operator () (const Arg &a) const { ++count_; return p_(a); }
size_t count() const { return count_; }
void reset() { count_ = 0; }
-
+
private:
Predicate p_;
mutable size_t count_;
@@ -33,7 +33,7 @@ public:
binary_counting_predicate ( Predicate p ) : p_(p), count_(0) {}
~binary_counting_predicate() {}
-
+
bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); }
size_t count() const { return count_; }
void reset() { count_ = 0; }