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.
}
};
-} // 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 */