diff --git a/asio/include/asio/ipv4/tcp.hpp b/asio/include/asio/ipv4/tcp.hpp index aee05b61..afe86514 100644 --- a/asio/include/asio/ipv4/tcp.hpp +++ b/asio/include/asio/ipv4/tcp.hpp @@ -238,6 +238,9 @@ private: asio::detail::inet_addr_v4_type addr_; }; +} // namespace ipv4 +} // namespace asio + /// Output an endpoint as a string. /** * Used to output a human-readable string for a specified endpoint. @@ -251,15 +254,13 @@ private: * @relates tcp::endpoint */ template -Ostream& operator<<(Ostream& os, const tcp::endpoint& endpoint) +Ostream& operator<<(Ostream& os, + const asio::ipv4::tcp::endpoint& endpoint) { os << endpoint.address().to_string() << ':' << endpoint.port(); return os; } -} // namespace ipv4 -} // namespace asio - #include "asio/detail/pop_options.hpp" #endif // ASIO_IPV4_TCP_HPP diff --git a/asio/include/asio/ipv4/udp.hpp b/asio/include/asio/ipv4/udp.hpp index f2eae413..fdce6d92 100644 --- a/asio/include/asio/ipv4/udp.hpp +++ b/asio/include/asio/ipv4/udp.hpp @@ -233,6 +233,9 @@ private: asio::detail::inet_addr_v4_type addr_; }; +} // namespace ipv4 +} // namespace asio + /// Output an endpoint as a string. /** * Used to output a human-readable string for a specified endpoint. @@ -246,15 +249,13 @@ private: * @relates tcp::endpoint */ template -Ostream& operator<<(Ostream& os, const udp::endpoint& endpoint) +Ostream& operator<<(Ostream& os, + const asio::ipv4::udp::endpoint& endpoint) { os << endpoint.address().to_string() << ':' << endpoint.port(); return os; } -} // namespace ipv4 -} // namespace asio - #include "asio/detail/pop_options.hpp" #endif // ASIO_IPV4_UDP_HPP