From 9b1f3478a1ba99ffe4f8c6f45ee04e91e340acfb Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Thu, 20 Nov 2014 16:16:58 +0800 Subject: [PATCH] types: Add operator<< for type boost::tuple. Signed-off-by: Jianpeng Ma --- src/include/types.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/include/types.h b/src/include/types.h index ea80a552bc117..949da5788e438 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(); -- 2.39.5