summaryrefslogtreecommitdiff
path: root/boost/asio/ip/basic_endpoint.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/asio/ip/basic_endpoint.hpp')
-rw-r--r--boost/asio/ip/basic_endpoint.hpp47
1 files changed, 24 insertions, 23 deletions
diff --git a/boost/asio/ip/basic_endpoint.hpp b/boost/asio/ip/basic_endpoint.hpp
index bad4114f0b..0951fd70d3 100644
--- a/boost/asio/ip/basic_endpoint.hpp
+++ b/boost/asio/ip/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// ip/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -57,7 +57,7 @@ public:
#endif
/// Default constructor.
- basic_endpoint()
+ basic_endpoint() BOOST_ASIO_NOEXCEPT
: impl_()
{
}
@@ -79,7 +79,7 @@ public:
* @endcode
*/
basic_endpoint(const InternetProtocol& internet_protocol,
- unsigned short port_num)
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT
: impl_(internet_protocol.family(), port_num)
{
}
@@ -87,27 +87,28 @@ public:
/// Construct an endpoint using a port number and an IP address. This
/// constructor may be used for accepting connections on a specific interface
/// or for making a connection to a remote endpoint.
- basic_endpoint(const boost::asio::ip::address& addr, unsigned short port_num)
+ basic_endpoint(const boost::asio::ip::address& addr,
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT
: impl_(addr, port_num)
{
}
/// Copy constructor.
- basic_endpoint(const basic_endpoint& other)
+ basic_endpoint(const basic_endpoint& other) BOOST_ASIO_NOEXCEPT
: impl_(other.impl_)
{
}
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- basic_endpoint(basic_endpoint&& other)
+ basic_endpoint(basic_endpoint&& other) BOOST_ASIO_NOEXCEPT
: impl_(other.impl_)
{
}
#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Assign from another endpoint.
- basic_endpoint& operator=(const basic_endpoint& other)
+ basic_endpoint& operator=(const basic_endpoint& other) BOOST_ASIO_NOEXCEPT
{
impl_ = other.impl_;
return *this;
@@ -115,7 +116,7 @@ public:
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-assign from another endpoint.
- basic_endpoint& operator=(basic_endpoint&& other)
+ basic_endpoint& operator=(basic_endpoint&& other) BOOST_ASIO_NOEXCEPT
{
impl_ = other.impl_;
return *this;
@@ -123,7 +124,7 @@ public:
#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// The protocol associated with the endpoint.
- protocol_type protocol() const
+ protocol_type protocol() const BOOST_ASIO_NOEXCEPT
{
if (impl_.is_v4())
return InternetProtocol::v4();
@@ -131,19 +132,19 @@ public:
}
/// Get the underlying endpoint in the native type.
- data_type* data()
+ data_type* data() BOOST_ASIO_NOEXCEPT
{
return impl_.data();
}
/// Get the underlying endpoint in the native type.
- const data_type* data() const
+ const data_type* data() const BOOST_ASIO_NOEXCEPT
{
return impl_.data();
}
/// Get the underlying size of the endpoint in the native type.
- std::size_t size() const
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
{
return impl_.size();
}
@@ -155,75 +156,75 @@ public:
}
/// Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
{
return impl_.capacity();
}
/// Get the port associated with the endpoint. The port number is always in
/// the host's byte order.
- unsigned short port() const
+ unsigned short port() const BOOST_ASIO_NOEXCEPT
{
return impl_.port();
}
/// Set the port associated with the endpoint. The port number is always in
/// the host's byte order.
- void port(unsigned short port_num)
+ void port(unsigned short port_num) BOOST_ASIO_NOEXCEPT
{
impl_.port(port_num);
}
/// Get the IP address associated with the endpoint.
- boost::asio::ip::address address() const
+ boost::asio::ip::address address() const BOOST_ASIO_NOEXCEPT
{
return impl_.address();
}
/// Set the IP address associated with the endpoint.
- void address(const boost::asio::ip::address& addr)
+ void address(const boost::asio::ip::address& addr) BOOST_ASIO_NOEXCEPT
{
impl_.address(addr);
}
/// Compare two endpoints for equality.
friend bool operator==(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return e1.impl_ == e2.impl_;
}
/// Compare two endpoints for inequality.
friend bool operator!=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return !(e1 == e2);
}
/// Compare endpoints for ordering.
friend bool operator<(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return e1.impl_ < e2.impl_;
}
/// Compare endpoints for ordering.
friend bool operator>(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return e2.impl_ < e1.impl_;
}
/// Compare endpoints for ordering.
friend bool operator<=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return !(e2 < e1);
}
/// Compare endpoints for ordering.
friend bool operator>=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return !(e1 < e2);
}