diff options
Diffstat (limited to 'rtc_base/ipaddress.h')
-rw-r--r-- | rtc_base/ipaddress.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/rtc_base/ipaddress.h b/rtc_base/ipaddress.h index aa8bb1a320..c965cf14e7 100644 --- a/rtc_base/ipaddress.h +++ b/rtc_base/ipaddress.h @@ -83,7 +83,13 @@ class IPAddress { bool operator!=(const IPAddress& other) const; bool operator <(const IPAddress& other) const; bool operator >(const IPAddress& other) const; - friend std::ostream& operator<<(std::ostream& os, const IPAddress& addr); + +#ifdef UNIT_TEST + inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) + std::ostream& os) { // no-presubmit-check TODO(webrtc:8982) + return os << ToString(); + } +#endif // UNIT_TEST int family() const { return family_; } in_addr ipv4_address() const; @@ -141,8 +147,6 @@ class InterfaceAddress : public IPAddress { bool operator!=(const InterfaceAddress& other) const; int ipv6_flags() const { return ipv6_flags_; } - friend std::ostream& operator<<(std::ostream& os, - const InterfaceAddress& addr); std::string ToString() const; |