From badd16b2ffc8756857829139769709bfdbf4792a Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 27 Jul 2020 09:33:49 +1000 Subject: [PATCH] Fix detection of standard executors as I/O executors in async_compose. --- include/boost/asio/impl/compose.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/boost/asio/impl/compose.hpp b/include/boost/asio/impl/compose.hpp index e7b74952..fc8f6757 100644 --- a/include/boost/asio/impl/compose.hpp +++ b/include/boost/asio/impl/compose.hpp @@ -496,14 +496,20 @@ namespace detail template inline typename IoObject::executor_type get_composed_io_executor(IoObject& io_object, - typename enable_if::value>::type* = 0) + typename enable_if< + !is_executor::value + && !execution::is_executor::value + >::type* = 0) { return io_object.get_executor(); } template inline const Executor& get_composed_io_executor(const Executor& ex, - typename enable_if::value>::type* = 0) + typename enable_if< + is_executor::value + || execution::is_executor::value + >::type* = 0) { return ex; }