From: Michael Andres Date: Mon, 4 Apr 2011 11:07:20 +0000 (+0200) Subject: Add stream output for multimap/set. X-Git-Tag: 9.0.0~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca77a0b60294057139d26dd54d3be76fdcbcc425;p=platform%2Fupstream%2Flibzypp.git Add stream output for multimap/set. --- diff --git a/zypp/base/LogTools.h b/zypp/base/LogTools.h index 953da5c..a1e257c 100644 --- a/zypp/base/LogTools.h +++ b/zypp/base/LogTools.h @@ -27,7 +27,7 @@ /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// - + using std::endl; /** Print range defined by iterators (multiline style). @@ -129,6 +129,10 @@ namespace zypp { return dumpRange( str, obj.begin(), obj.end() ); } template + std::ostream & operator<<( std::ostream & str, const std::multiset<_Tp> & obj ) + { return dumpRange( str, obj.begin(), obj.end() ); } + + template std::ostream & operator<<( std::ostream & str, const std::list<_Tp> & obj ) { return dumpRange( str, obj.begin(), obj.end() ); } @@ -333,6 +337,10 @@ namespace zypp std::ostream & operator<<( std::ostream & str, const std::tr1::unordered_map<_Key, _Tp> & obj ) { return str << dumpMap( obj ); } + template + std::ostream & operator<<( std::ostream & str, const std::multimap<_Key, _Tp> & obj ) + { return str << dumpMap( obj ); } + /** Print stream status bits. * Prints the values of a streams \c good, \c eof, \c failed and \c bad bit. *