2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-26 18:22:09 +00:00

Fix detection of standard executors as I/O executors in async_compose.

This commit is contained in:
Christopher Kohlhoff
2020-07-27 09:33:49 +10:00
parent 55a6f4aefe
commit badd16b2ff

View File

@@ -496,14 +496,20 @@ namespace detail
template <typename IoObject>
inline typename IoObject::executor_type
get_composed_io_executor(IoObject& io_object,
typename enable_if<!is_executor<IoObject>::value>::type* = 0)
typename enable_if<
!is_executor<IoObject>::value
&& !execution::is_executor<IoObject>::value
>::type* = 0)
{
return io_object.get_executor();
}
template <typename Executor>
inline const Executor& get_composed_io_executor(const Executor& ex,
typename enable_if<is_executor<Executor>::value>::type* = 0)
typename enable_if<
is_executor<Executor>::value
|| execution::is_executor<Executor>::value
>::type* = 0)
{
return ex;
}