diff options
Diffstat (limited to '3rdParty/Boost/src/boost/asio/ip/basic_resolver.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/asio/ip/basic_resolver.hpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/3rdParty/Boost/src/boost/asio/ip/basic_resolver.hpp b/3rdParty/Boost/src/boost/asio/ip/basic_resolver.hpp index f27515a..6265890 100644 --- a/3rdParty/Boost/src/boost/asio/ip/basic_resolver.hpp +++ b/3rdParty/Boost/src/boost/asio/ip/basic_resolver.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver.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) @@ -17,6 +17,7 @@ #include <boost/asio/detail/config.hpp> #include <boost/asio/basic_io_object.hpp> +#include <boost/asio/detail/handler_type_requirements.hpp> #include <boost/asio/detail/throw_error.hpp> #include <boost/asio/error.hpp> #include <boost/asio/ip/basic_resolver_iterator.hpp> @@ -99,7 +100,7 @@ public: { boost::system::error_code ec; iterator i = this->service.resolve(this->implementation, q, ec); - boost::asio::detail::throw_error(ec); + boost::asio::detail::throw_error(ec, "resolve"); return i; } @@ -152,9 +153,16 @@ public: * the handler. */ template <typename ResolveHandler> - void async_resolve(const query& q, ResolveHandler handler) + void async_resolve(const query& q, + BOOST_ASIO_MOVE_ARG(ResolveHandler) handler) { - return this->service.async_resolve(this->implementation, q, handler); + // If you get an error on the following line it means that your handler does + // not meet the documented type requirements for a ResolveHandler. + BOOST_ASIO_RESOLVE_HANDLER_CHECK( + ResolveHandler, handler, iterator) type_check; + + return this->service.async_resolve(this->implementation, q, + BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler)); } /// Perform reverse resolution of an endpoint to a list of entries. @@ -179,7 +187,7 @@ public: { boost::system::error_code ec; iterator i = this->service.resolve(this->implementation, e, ec); - boost::asio::detail::throw_error(ec); + boost::asio::detail::throw_error(ec, "resolve"); return i; } @@ -236,9 +244,16 @@ public: * the handler. */ template <typename ResolveHandler> - void async_resolve(const endpoint_type& e, ResolveHandler handler) + void async_resolve(const endpoint_type& e, + BOOST_ASIO_MOVE_ARG(ResolveHandler) handler) { - return this->service.async_resolve(this->implementation, e, handler); + // If you get an error on the following line it means that your handler does + // not meet the documented type requirements for a ResolveHandler. + BOOST_ASIO_RESOLVE_HANDLER_CHECK( + ResolveHandler, handler, iterator) type_check; + + return this->service.async_resolve(this->implementation, e, + BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler)); } }; |