summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-23 13:16:26 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-23 14:43:26 (GMT)
commit491ddd570a752cf9bda85933bed0c6942e39b1f9 (patch)
tree10c25c1be8cc08d0497df1dccd56a10fbb30beee /3rdParty/Boost/src/boost/asio/ip/impl/address.ipp
parentda7d7a0ca71b80281aa9ff2526290b61ccb0cc60 (diff)
downloadswift-491ddd570a752cf9bda85933bed0c6942e39b1f9.zip
swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.tar.bz2
Update Boost to 1.52.0.
Change-Id: I1e56bea2600bf2ed9c5b3aba8c4f9d2a0f350e77
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_)