diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-12-23 13:16:26 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-12-23 14:43:26 (GMT) |
commit | 491ddd570a752cf9bda85933bed0c6942e39b1f9 (patch) | |
tree | 10c25c1be8cc08d0497df1dccd56a10fbb30beee /3rdParty/Boost/src/boost/asio/local | |
parent | da7d7a0ca71b80281aa9ff2526290b61ccb0cc60 (diff) | |
download | swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.zip swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.tar.bz2 |
Update Boost to 1.52.0.
Change-Id: I1e56bea2600bf2ed9c5b3aba8c4f9d2a0f350e77
Diffstat (limited to '3rdParty/Boost/src/boost/asio/local')
6 files changed, 42 insertions, 25 deletions
diff --git a/3rdParty/Boost/src/boost/asio/local/basic_endpoint.hpp b/3rdParty/Boost/src/boost/asio/local/basic_endpoint.hpp index fcb53a0..f191dd6 100644 --- a/3rdParty/Boost/src/boost/asio/local/basic_endpoint.hpp +++ b/3rdParty/Boost/src/boost/asio/local/basic_endpoint.hpp @@ -2,7 +2,7 @@ // local/basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Derived from a public domain implementation written by Daniel Casimiro. // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -66,14 +66,14 @@ public: } /// Construct an endpoint using the specified path name. - basic_endpoint(const char* path) - : impl_(path) + basic_endpoint(const char* path_name) + : impl_(path_name) { } /// Construct an endpoint using the specified path name. - basic_endpoint(const std::string& path) - : impl_(path) + basic_endpoint(const std::string& path_name) + : impl_(path_name) { } @@ -83,6 +83,14 @@ public: { } +#if defined(BOOST_ASIO_HAS_MOVE) + /// Move constructor. + basic_endpoint(basic_endpoint&& other) + : impl_(other.impl_) + { + } +#endif // defined(BOOST_ASIO_HAS_MOVE) + /// Assign from another endpoint. basic_endpoint& operator=(const basic_endpoint& other) { @@ -90,6 +98,15 @@ public: return *this; } +#if defined(BOOST_ASIO_HAS_MOVE) + /// Move-assign from another endpoint. + basic_endpoint& operator=(basic_endpoint&& other) + { + impl_ = other.impl_; + return *this; + } +#endif // defined(BOOST_ASIO_HAS_MOVE) + /// The protocol associated with the endpoint. protocol_type protocol() const { @@ -115,9 +132,9 @@ public: } /// Set the underlying size of the endpoint in the native type. - void resize(std::size_t size) + void resize(std::size_t new_size) { - impl_.resize(size); + impl_.resize(new_size); } /// Get the capacity of the endpoint in the native type. diff --git a/3rdParty/Boost/src/boost/asio/local/connect_pair.hpp b/3rdParty/Boost/src/boost/asio/local/connect_pair.hpp index 9ef6cd3..e691398 100644 --- a/3rdParty/Boost/src/boost/asio/local/connect_pair.hpp +++ b/3rdParty/Boost/src/boost/asio/local/connect_pair.hpp @@ -2,7 +2,7 @@ // local/connect_pair.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// 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) @@ -52,7 +52,7 @@ inline void connect_pair( { boost::system::error_code ec; connect_pair(socket1, socket2, ec); - boost::asio::detail::throw_error(ec); + boost::asio::detail::throw_error(ec, "connect_pair"); } template <typename Protocol, typename SocketService1, typename SocketService2> diff --git a/3rdParty/Boost/src/boost/asio/local/datagram_protocol.hpp b/3rdParty/Boost/src/boost/asio/local/datagram_protocol.hpp index eaa0241..6fa6323 100644 --- a/3rdParty/Boost/src/boost/asio/local/datagram_protocol.hpp +++ b/3rdParty/Boost/src/boost/asio/local/datagram_protocol.hpp @@ -2,7 +2,7 @@ // local/datagram_protocol.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// 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) diff --git a/3rdParty/Boost/src/boost/asio/local/detail/endpoint.hpp b/3rdParty/Boost/src/boost/asio/local/detail/endpoint.hpp index c527793..998d371 100644 --- a/3rdParty/Boost/src/boost/asio/local/detail/endpoint.hpp +++ b/3rdParty/Boost/src/boost/asio/local/detail/endpoint.hpp @@ -2,7 +2,7 @@ // local/detail/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Derived from a public domain implementation written by Daniel Casimiro. // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -39,10 +39,10 @@ public: BOOST_ASIO_DECL endpoint(); // Construct an endpoint using the specified path name. - BOOST_ASIO_DECL endpoint(const char* path); + BOOST_ASIO_DECL endpoint(const char* path_name); // Construct an endpoint using the specified path name. - BOOST_ASIO_DECL endpoint(const std::string& path); + BOOST_ASIO_DECL endpoint(const std::string& path_name); // Copy constructor. endpoint(const endpoint& other) diff --git a/3rdParty/Boost/src/boost/asio/local/detail/impl/endpoint.ipp b/3rdParty/Boost/src/boost/asio/local/detail/impl/endpoint.ipp index a4c1e56..8e3d06a 100644 --- a/3rdParty/Boost/src/boost/asio/local/detail/impl/endpoint.ipp +++ b/3rdParty/Boost/src/boost/asio/local/detail/impl/endpoint.ipp @@ -2,7 +2,7 @@ // local/detail/impl/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Derived from a public domain implementation written by Daniel Casimiro. // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -38,31 +38,31 @@ endpoint::endpoint() init("", 0); } -endpoint::endpoint(const char* path) +endpoint::endpoint(const char* path_name) { using namespace std; // For strlen. - init(path, strlen(path)); + init(path_name, strlen(path_name)); } -endpoint::endpoint(const std::string& path) +endpoint::endpoint(const std::string& path_name) { - init(path.data(), path.length()); + init(path_name.data(), path_name.length()); } -void endpoint::resize(std::size_t size) +void endpoint::resize(std::size_t new_size) { - if (size > sizeof(boost::asio::detail::sockaddr_un_type)) + if (new_size > sizeof(boost::asio::detail::sockaddr_un_type)) { boost::system::error_code ec(boost::asio::error::invalid_argument); boost::asio::detail::throw_error(ec); } - else if (size == 0) + else if (new_size == 0) { path_length_ = 0; } else { - path_length_ = size + path_length_ = new_size - offsetof(boost::asio::detail::sockaddr_un_type, sun_path); // The path returned by the operating system may be NUL-terminated. @@ -97,7 +97,7 @@ bool operator<(const endpoint& e1, const endpoint& e2) return e1.path() < e2.path(); } -void endpoint::init(const char* path, std::size_t path_length) +void endpoint::init(const char* path_name, std::size_t path_length) { if (path_length > sizeof(data_.local.sun_path) - 1) { @@ -109,7 +109,7 @@ void endpoint::init(const char* path, std::size_t path_length) using namespace std; // For memcpy. data_.local = boost::asio::detail::sockaddr_un_type(); data_.local.sun_family = AF_UNIX; - memcpy(data_.local.sun_path, path, path_length); + memcpy(data_.local.sun_path, path_name, path_length); path_length_ = path_length; // NUL-terminate normal path names. Names that start with a NUL are in the diff --git a/3rdParty/Boost/src/boost/asio/local/stream_protocol.hpp b/3rdParty/Boost/src/boost/asio/local/stream_protocol.hpp index e8692c5..c747666 100644 --- a/3rdParty/Boost/src/boost/asio/local/stream_protocol.hpp +++ b/3rdParty/Boost/src/boost/asio/local/stream_protocol.hpp @@ -2,7 +2,7 @@ // local/stream_protocol.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// 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) |