summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/asio/ip/impl/address.ipp')
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/impl/address.ipp42
1 files changed, 41 insertions, 1 deletions
diff --git a/3rdParty/Boost/src/boost/asio/ip/impl/address.ipp b/3rdParty/Boost/src/boost/asio/ip/impl/address.ipp
index 11f06fc..5353758 100644
--- a/3rdParty/Boost/src/boost/asio/ip/impl/address.ipp
+++ b/3rdParty/Boost/src/boost/asio/ip/impl/address.ipp
@@ -2,7 +2,7 @@
// ip/impl/address.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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,6 +57,15 @@ address::address(const address& other)
{
}
+#if defined(BOOST_ASIO_HAS_MOVE)
+address::address(address&& other)
+ : type_(other.type_),
+ ipv4_address_(other.ipv4_address_),
+ ipv6_address_(other.ipv6_address_)
+{
+}
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
address& address::operator=(const address& other)
{
type_ = other.type_;
@@ -65,6 +74,16 @@ address& address::operator=(const address& other)
return *this;
}
+#if defined(BOOST_ASIO_HAS_MOVE)
+address& address::operator=(address&& other)
+{
+ type_ = other.type_;
+ ipv4_address_ = other.ipv4_address_;
+ ipv6_address_ = other.ipv6_address_;
+ return *this;
+}
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
address& address::operator=(const boost::asio::ip::address_v4& ipv4_address)
{
type_ = ipv4;
@@ -159,6 +178,27 @@ address address::from_string(const std::string& str,
return from_string(str.c_str(), ec);
}
+bool address::is_loopback() const
+{
+ return (type_ == ipv4)
+ ? ipv4_address_.is_loopback()
+ : ipv6_address_.is_loopback();
+}
+
+bool address::is_unspecified() const
+{
+ return (type_ == ipv4)
+ ? ipv4_address_.is_unspecified()
+ : ipv6_address_.is_unspecified();
+}
+
+bool address::is_multicast() const
+{
+ return (type_ == ipv4)
+ ? ipv4_address_.is_multicast()
+ : ipv6_address_.is_multicast();
+}
+
bool operator==(const address& a1, const address& a2)
{
if (a1.type_ != a2.type_)