From 70eafae18736d4c59728b897f54d60de3e525761 Mon Sep 17 00:00:00 2001 From: debris Date: Sun, 8 Feb 2015 21:41:42 +0100 Subject: [PATCH] fixed arrays << error in msvc --- libdevcore/CommonIO.h | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/libdevcore/CommonIO.h b/libdevcore/CommonIO.h index d2a67921b..23092b702 100644 --- a/libdevcore/CommonIO.h +++ b/libdevcore/CommonIO.h @@ -57,7 +57,7 @@ template struct StreamOut { static S& bypass(S& _out, T const template struct StreamOut { static S& bypass(S& _out, uint8_t const& _t) { _out << (int)_t; return _out; } }; template inline std::ostream& operator<<(std::ostream& _out, std::vector const& _e); -template inline std::ostream& operator<<(std::ostream& _out, std::array const& _e); +template inline std::ostream& operator<<(std::ostream& _out, std::array const& _e); template inline std::ostream& operator<<(std::ostream& _out, std::pair const& _e); template inline std::ostream& operator<<(std::ostream& _out, std::list const& _e); template inline std::ostream& operator<<(std::ostream& _out, std::tuple const& _e); @@ -84,7 +84,7 @@ inline S& streamout(S& _out, std::vector const& _e) template inline std::ostream& operator<<(std::ostream& _out, std::vector const& _e) { streamout(_out, _e); return _out; } -template +template inline S& streamout(S& _out, std::array const& _e) { _out << "["; @@ -98,23 +98,7 @@ inline S& streamout(S& _out, std::array const& _e) _out << "]"; return _out; } -template inline std::ostream& operator<<(std::ostream& _out, std::array const& _e) { streamout(_out, _e); return _out; } - -template -inline S& streamout(S& _out, std::array const& _e) -{ - _out << "["; - if (!_e.empty()) - { - StreamOut::bypass(_out, _e.front()); - auto i = _e.begin(); - for (++i; i != _e.end(); ++i) - StreamOut::bypass(_out << ",", *i); - } - _out << "]"; - return _out; -} -template inline std::ostream& operator<<(std::ostream& _out, std::array const& _e) { streamout(_out, _e); return _out; } +template inline std::ostream& operator<<(std::ostream& _out, std::array const& _e) { streamout(_out, _e); return _out; } template inline S& streamout(S& _out, std::list const& _e)