From: Jianpeng Ma Date: Thu, 20 Nov 2014 08:16:58 +0000 (+0800) Subject: types: Add operator<< for type boost::tuple. X-Git-Tag: v0.91~55^2~3^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9b1f3478a1ba99ffe4f8c6f45ee04e91e340acfb;p=ceph.git types: Add operator<< for type boost::tuple. Signed-off-by: Jianpeng Ma --- diff --git a/src/include/types.h b/src/include/types.h index ea80a552bc1..949da5788e4 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -123,6 +123,12 @@ inline ostream& operator<<(ostream& out, const list& ilist) { return out; } +template +inline ostream& operator<<(ostream&out, const boost::tuple &t) { + out << boost::get<0>(t) <<"," << boost::get<1>(t) << "," << boost::get<2>(t); + return out; +} + template inline ostream& operator<<(ostream& out, const set& iset) { for (typename set::const_iterator it = iset.begin();