[libcxx] r212651 - Add a reset method to the counting predicates in the test suite

Marshall Clow mclow.lists at gmail.com
Wed Jul 9 14:04:23 PDT 2014


Author: marshall
Date: Wed Jul  9 16:04:22 2014
New Revision: 212651

URL: http://llvm.org/viewvc/llvm-project?rev=212651&view=rev
Log:
Add a reset method to the counting predicates in the test suite

Modified:
    libcxx/trunk/test/support/counting_predicates.hpp

Modified: libcxx/trunk/test/support/counting_predicates.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/counting_predicates.hpp?rev=212651&r1=212650&r2=212651&view=diff
==============================================================================
--- libcxx/trunk/test/support/counting_predicates.hpp (original)
+++ libcxx/trunk/test/support/counting_predicates.hpp Wed Jul  9 16:04:22 2014
@@ -22,6 +22,7 @@ public:
 	
 	bool operator () (const argument_type &a) const { ++count_; return p_(a); }
 	size_t count() const { return count_; }
+	void reset() { count_ = 0; }
 	
 private:
 	Predicate p_;
@@ -38,7 +39,8 @@ public:
 	
 	bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); }
 	size_t count() const { return count_; }
-	
+	void reset() { count_ = 0; }
+
 private:
 	Predicate p_;
 	mutable size_t count_;





More information about the cfe-commits mailing list