// detail/work_dispatcher.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
class work_dispatcher
{
public:
- work_dispatcher(Handler& handler)
+ template <typename CompletionHandler>
+ explicit work_dispatcher(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler)
: work_((get_associated_executor)(handler)),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
+ handler_(BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler))
{
}