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/strand.hpp | |
| 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/strand.hpp')
| -rw-r--r-- | 3rdParty/Boost/src/boost/asio/strand.hpp | 38 | 
1 files changed, 16 insertions, 22 deletions
diff --git a/3rdParty/Boost/src/boost/asio/strand.hpp b/3rdParty/Boost/src/boost/asio/strand.hpp index 2928167..6a1033f 100644 --- a/3rdParty/Boost/src/boost/asio/strand.hpp +++ b/3rdParty/Boost/src/boost/asio/strand.hpp @@ -2,7 +2,7 @@  // strand.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) @@ -16,6 +16,7 @@  #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)  #include <boost/asio/detail/config.hpp> +#include <boost/asio/detail/handler_type_requirements.hpp>  #include <boost/asio/detail/strand_service.hpp>  #include <boost/asio/detail/wrapped_handler.hpp>  #include <boost/asio/io_service.hpp> @@ -104,21 +105,6 @@ public:     */    ~strand()    { -    service_.destroy(impl_); -  } - -  /// (Deprecated: use get_io_service().) Get the io_service associated with -  /// the strand. -  /** -   * This function may be used to obtain the io_service object that the strand -   * uses to dispatch handlers for asynchronous operations. -   * -   * @return A reference to the io_service object that the strand will use to -   * dispatch handlers. Ownership is not transferred to the caller. -   */ -  boost::asio::io_service& io_service() -  { -    return service_.get_io_service();    }    /// Get the io_service associated with the strand. @@ -153,10 +139,14 @@ public:     * handler object as required. The function signature of the handler must be:     * @code void handler(); @endcode     */ -  template <typename Handler> -  void dispatch(Handler handler) +  template <typename CompletionHandler> +  void dispatch(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler)    { -    service_.dispatch(impl_, handler); +    // If you get an error on the following line it means that your handler does +    // not meet the documented type requirements for a CompletionHandler. +    BOOST_ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check; + +    service_.dispatch(impl_, BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler));    }    /// Request the strand to invoke the given handler and return @@ -175,10 +165,14 @@ public:     * handler object as required. The function signature of the handler must be:     * @code void handler(); @endcode     */ -  template <typename Handler> -  void post(Handler handler) +  template <typename CompletionHandler> +  void post(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler)    { -    service_.post(impl_, handler); +    // If you get an error on the following line it means that your handler does +    // not meet the documented type requirements for a CompletionHandler. +    BOOST_ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check; + +    service_.post(impl_, BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler));    }    /// Create a new handler that automatically dispatches the wrapped handler  | 
 Swift