/// Impresión de response
std::ostream& operator<< (std::ostream& os, const ResolvProtoResponse& rpr)
{
- if (rpr.ips.empty())
- return os;
os << "ResolvProtoResponse(ret=" << unsigned(rpr.ret)
- << ", ttl=" << rpr.ttl << ", ";
+ << ", ttl=" << rpr.ttl;
+ if (rpr.ips.empty())
+ return os << ")";
+ os << ", ";
std::copy(rpr.ips.begin(), rpr.ips.end() - 1,
std::ostream_iterator< IPAddr >(os, ", "));
return os << rpr.ips.back() << ")";