diff options
Diffstat (limited to 'src/common.hpp')
-rw-r--r-- | src/common.hpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common.hpp b/src/common.hpp index a6f0717c..b9b90270 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -84,6 +84,22 @@ option<T> None() { namespace std { template <typename T> +inline ::std::ostream& operator<<(::std::ostream& os, const ::std::vector<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> inline ::std::ostream& operator<<(::std::ostream& os, const ::std::vector<T>& v) { if( v.size() > 0 ) { |