summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/include/asio/ip/network_v6.hpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio/include/asio/ip/network_v6.hpp')
-rw-r--r--3rdparty/asio/include/asio/ip/network_v6.hpp36
1 files changed, 16 insertions, 20 deletions
diff --git a/3rdparty/asio/include/asio/ip/network_v6.hpp b/3rdparty/asio/include/asio/ip/network_v6.hpp
index 4e07dbbc71d..942ed9d2f29 100644
--- a/3rdparty/asio/include/asio/ip/network_v6.hpp
+++ b/3rdparty/asio/include/asio/ip/network_v6.hpp
@@ -2,7 +2,7 @@
// ip/network_v6.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -40,7 +40,7 @@ class network_v6
{
public:
/// Default constructor.
- network_v6() ASIO_NOEXCEPT
+ network_v6() noexcept
: address_(),
prefix_length_(0)
{
@@ -51,66 +51,62 @@ public:
unsigned short prefix_len);
/// Copy constructor.
- network_v6(const network_v6& other) ASIO_NOEXCEPT
+ network_v6(const network_v6& other) noexcept
: address_(other.address_),
prefix_length_(other.prefix_length_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- network_v6(network_v6&& other) ASIO_NOEXCEPT
- : address_(ASIO_MOVE_CAST(address_v6)(other.address_)),
+ network_v6(network_v6&& other) noexcept
+ : address_(static_cast<address_v6&&>(other.address_)),
prefix_length_(other.prefix_length_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another network.
- network_v6& operator=(const network_v6& other) ASIO_NOEXCEPT
+ network_v6& operator=(const network_v6& other) noexcept
{
address_ = other.address_;
prefix_length_ = other.prefix_length_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another network.
- network_v6& operator=(network_v6&& other) ASIO_NOEXCEPT
+ network_v6& operator=(network_v6&& other) noexcept
{
- address_ = ASIO_MOVE_CAST(address_v6)(other.address_);
+ address_ = static_cast<address_v6&&>(other.address_);
prefix_length_ = other.prefix_length_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Obtain the address object specified when the network object was created.
- address_v6 address() const ASIO_NOEXCEPT
+ address_v6 address() const noexcept
{
return address_;
}
/// Obtain the prefix length that was specified when the network object was
/// created.
- unsigned short prefix_length() const ASIO_NOEXCEPT
+ unsigned short prefix_length() const noexcept
{
return prefix_length_;
}
/// Obtain an address object that represents the network address.
- ASIO_DECL address_v6 network() const ASIO_NOEXCEPT;
+ ASIO_DECL address_v6 network() const noexcept;
/// Obtain an address range corresponding to the hosts in the network.
- ASIO_DECL address_v6_range hosts() const ASIO_NOEXCEPT;
+ ASIO_DECL address_v6_range hosts() const noexcept;
/// Obtain the true network address, omitting any host bits.
- network_v6 canonical() const ASIO_NOEXCEPT
+ network_v6 canonical() const noexcept
{
return network_v6(network(), prefix_length());
}
/// Test if network is a valid host address.
- bool is_host() const ASIO_NOEXCEPT
+ bool is_host() const noexcept
{
return prefix_length_ == 128;
}
@@ -181,7 +177,7 @@ ASIO_DECL network_v6 make_network_v6(const std::string& str);
ASIO_DECL network_v6 make_network_v6(
const std::string& str, asio::error_code& ec);
-#if defined(ASIO_HAS_STD_STRING_VIEW) \
+#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
/// Create an IPv6 network from a string containing IP address and prefix
@@ -199,7 +195,7 @@ ASIO_DECL network_v6 make_network_v6(string_view str);
ASIO_DECL network_v6 make_network_v6(
string_view str, asio::error_code& ec);
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
#if !defined(ASIO_NO_IOSTREAM)