Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52397 - trunk/libs/unordered/test/helpers
From: daniel_james_at_[hidden]
Date: 2009-04-14 13:51:34


Author: danieljames
Date: 2009-04-14 13:51:34 EDT (Tue, 14 Apr 2009)
New Revision: 52397
URL: http://svn.boost.org/trac/boost/changeset/52397

Log:
Add stream output to the count test helper for unordered.
Text files modified:
   trunk/libs/unordered/test/helpers/count.hpp | 7 +++++++
   1 files changed, 7 insertions(+), 0 deletions(-)

Modified: trunk/libs/unordered/test/helpers/count.hpp
==============================================================================
--- trunk/libs/unordered/test/helpers/count.hpp (original)
+++ trunk/libs/unordered/test/helpers/count.hpp 2009-04-14 13:51:34 EDT (Tue, 14 Apr 2009)
@@ -6,6 +6,8 @@
 #if !defined(BOOST_UNORDERED_TEST_HELPERS_COUNT_HEAD)
 #define BOOST_UNORDERED_TEST_HELPERS_COUNT_HEAD
 
+#include <iostream>
+
 namespace test {
     struct object_count {
         int instances;
@@ -36,6 +38,11 @@
         bool operator!=(object_count const& x) const {
             return !(*this == x);
         }
+
+ friend std::ostream& operator<<(std::ostream& out, object_count const& c) {
+ out<<"[instances: "<<c.instances<<", constructions: "<<c.constructions<<"]";
+ return out;
+ }
     };
 
     template <class T>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk