summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common.hpp b/src/common.hpp
index 35113670..e58fc0da 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -6,6 +6,7 @@
#include <iostream>
#include <vector>
#include <map>
+#include <set>
#include <cassert>
#include <sstream>
#include <memory>
@@ -223,6 +224,21 @@ inline ::std::ostream& operator<<(::std::ostream& os, const ::std::vector<T>& v)
}
return os;
}
+template <typename T>
+inline ::std::ostream& operator<<(::std::ostream& os, const ::std::set<T>& v) {
+ if( v.size() > 0 )
+ {
+ bool is_first = true;
+ for( const auto& i : v )
+ {
+ if(!is_first)
+ os << ", ";
+ is_first = false;
+ os << i;
+ }
+ }
+ return os;
+}
template <typename T, typename U>
inline ::std::ostream& operator<<(::std::ostream& os, const ::std::pair<T,U>& v) {