]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Move the AnyP::ProtocolVersion stream operator into AnyP:: namespace
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 18 Nov 2014 06:38:51 +0000 (22:38 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 18 Nov 2014 06:38:51 +0000 (22:38 -0800)
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.

src/anyp/ProtocolVersion.h

index 312242aadec4d00fd468d98e968fd6f6e4cf3281..61f2c6a17b9fd32df2ff0c6fcf93b9b0ff6e581d 100644 (file)
@@ -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 */