]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/asio/detail/work_dispatcher.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / asio / detail / work_dispatcher.hpp
index 3167f244fd90c7d1ab83b0474a95f33e352412e7..9a92c45e0223bc749555111b85eb067d09335f11 100644 (file)
@@ -2,7 +2,7 @@
 // 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)
@@ -30,9 +30,10 @@ template <typename Handler>
 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))
   {
   }