From 9f832c659d662a790d6200bfd7b00a7dc7138bbf Mon Sep 17 00:00:00 2001 From: subtly Date: Wed, 8 Oct 2014 12:22:08 +0200 Subject: [PATCH] fix for clang builds --- libp2p/Session.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libp2p/Session.cpp b/libp2p/Session.cpp index 12f48f3c9..d6a45bfc7 100644 --- a/libp2p/Session.cpp +++ b/libp2p/Session.cpp @@ -86,7 +86,13 @@ bool Session::interpret(RLP const& _r) m_listenPort = _r[4].toInt(); m_id = _r[5].toHash(); - clogS(NetMessageSummary) << "Hello: " << clientVersion << "V[" << m_protocolVersion << "]" << m_id.abridged() << showbase << hex << caps << dec << m_listenPort; + // clang error (previously: ... << hex << caps ...) + // "'operator<<' should be declared prior to the call site or in an associated namespace of one of its arguments" + stringstream capslog; + for (auto cap: caps) + capslog << "(" << hex << cap.first << "," << hex << cap.second << ")"; + + clogS(NetMessageSummary) << "Hello: " << clientVersion << "V[" << m_protocolVersion << "]" << m_id.abridged() << showbase << capslog.str() << dec << m_listenPort; if (m_server->havePeer(m_id)) {