Add stream output to the count test helper for unordered.

[SVN r52397]
This commit is contained in:
Daniel James
2009-04-14 17:51:34 +00:00
parent ac2409627a
commit 3f0e2b478b

View File

@ -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 @@ namespace test {
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>