]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/asio/use_awaitable.hpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / asio / use_awaitable.hpp
index fa5edddbc38c00a0e1b5731ea8a6ab7a5755ba9a..152e3286722d625df01f5ea659c186c54739ea92 100644 (file)
@@ -2,7 +2,7 @@
 // use_awaitable.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 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)
@@ -79,13 +79,14 @@ struct use_awaitable_t
   /// Function helper to adapt an I/O object to use @c use_awaitable_t as its
   /// default completion token type.
   template <typename T>
-  static typename T::template rebind_executor<
-      executor_with_default<typename T::executor_type>
+  static typename decay<T>::type::template rebind_executor<
+      executor_with_default<typename decay<T>::type::executor_type>
     >::other
   as_default_on(BOOST_ASIO_MOVE_ARG(T) object)
   {
-    return typename as_default_on_t<typename decay<T>::type>::type(
-        BOOST_ASIO_MOVE_CAST(T)(object));
+    return typename decay<T>::type::template rebind_executor<
+        executor_with_default<typename decay<T>::type::executor_type>
+      >::other(BOOST_ASIO_MOVE_CAST(T)(object));
   }
 };