Skip to content

Commit

Permalink
Enhanced compatibility with new versions of asio zhllxt#49
Browse files Browse the repository at this point in the history
  • Loading branch information
zhllxt committed May 9, 2023
1 parent 22daf38 commit ac8c799
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion include/asio2/bho/beast/core/async_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ class async_base
if(! is_continuation)
{
auto const ex = get_executor();
net::post(net::bind_executor(
net::post(
wg1_.get_executor(),
net::bind_executor(
ex,
beast::bind_front_handler(
std::move(h_),
Expand Down
4 changes: 2 additions & 2 deletions include/asio2/bho/beast/core/detail/work_guard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ struct select_work_guard
template<class Executor>
struct execution_work_guard
{
using executor_type = decltype(
using executor_type = typename std::decay<decltype(
net::prefer(std::declval<Executor const&>(),
net::execution::outstanding_work.tracked));
net::execution::outstanding_work.tracked))>::type;

execution_work_guard(Executor const& exec)
: ex_(net::prefer(exec, net::execution::outstanding_work.tracked))
Expand Down
2 changes: 1 addition & 1 deletion include/asio2/bho/beast/core/stream_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ using executor_type =
#else
template<class T>
using executor_type =
decltype(std::declval<T&>().get_executor());
typename std::decay<decltype(std::declval<T&>().get_executor())>::type;
#endif

/** Determine if `T` has the `get_executor` member function.
Expand Down

0 comments on commit ac8c799

Please sign in to comment.