diff --git a/src/common/async/bind_handler.h b/src/common/async/bind_handler.h index 69128501a07f7..4cc9a2a113d20 100644 --- a/src/common/async/bind_handler.h +++ b/src/common/async/bind_handler.h @@ -16,8 +16,7 @@ #define CEPH_ASYNC_BIND_HANDLER_H #include -#include -#include +#include namespace ceph::async { @@ -52,25 +51,25 @@ struct CompletionHandler { void operator()() && { std::apply(std::move(handler), std::move(args)); } - - using allocator_type = boost::asio::associated_allocator_t; - allocator_type get_allocator() const noexcept { - return boost::asio::get_associated_allocator(handler); - } }; } // namespace ceph::async namespace boost::asio { -// specialize boost::asio::associated_executor<> for CompletionHandler -template -struct associated_executor, Executor> { - using type = boost::asio::associated_executor_t; - - static type get(const ceph::async::CompletionHandler& handler, - const Executor& ex = Executor()) noexcept { - return boost::asio::get_associated_executor(handler.handler, ex); +// forward the handler's associated executor, allocator, cancellation slot, etc +template