From: Amos Jeffries Date: Tue, 18 Nov 2014 06:38:51 +0000 (-0800) Subject: Move the AnyP::ProtocolVersion stream operator into AnyP:: namespace X-Git-Tag: merge-candidate-3-v1~489 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be683c55c9a4674bbe2ea27ae6f79cabe70838c1;p=thirdparty%2Fsquid.git Move the AnyP::ProtocolVersion stream operator into AnyP:: namespace Clang compiler detects an issue determining which of multiple overloaded operator<<() at global scope apply to the display of AnyP::ProtocolVersion. Moving the operator into the class itself is not possible due to similar scoping issues with GCC failing to detect it as an inline member from inside expanded templates. To resolve both issues we can move the operator only to the AnyP:: namespace but no deeper. --- diff --git a/src/anyp/ProtocolVersion.h b/src/anyp/ProtocolVersion.h index 312242aade..61f2c6a17b 100644 --- a/src/anyp/ProtocolVersion.h +++ b/src/anyp/ProtocolVersion.h @@ -88,12 +88,12 @@ public: } }; -} // namespace AnyP - inline std::ostream & operator << (std::ostream &os, const AnyP::ProtocolVersion &v) { return (os << AnyP::ProtocolType_str[v.protocol] << '/' << v.major << '.' << v.minor); } +} // namespace AnyP + #endif /* SQUID_ANYP_PROTOCOLVERSION_H */