From: Sage Weil Date: Wed, 22 Jul 2015 15:31:11 +0000 (-0400) Subject: include/types: operator<< for set with comparator X-Git-Tag: v9.1.0~346^2~40 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9b8e536f0c4c5991c774147d5e01f0d538a890bf;p=ceph.git include/types: operator<< for set with comparator Signed-off-by: Sage Weil --- diff --git a/src/include/types.h b/src/include/types.h index 89b3acf8499..9de4e1c4207 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -140,6 +140,17 @@ inline ostream& operator<<(ostream& out, const set& iset) { return out; } +template +inline ostream& operator<<(ostream& out, const set& iset) { + for (typename set::const_iterator it = iset.begin(); + it != iset.end(); + ++it) { + if (it != iset.begin()) out << ","; + out << *it; + } + return out; +} + template inline ostream& operator<<(ostream& out, const multiset& iset) { for (typename multiset::const_iterator it = iset.begin();