From 198a42e03bfe1f024c7c0d50a67fab191c586f09 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Fri, 20 Mar 2026 11:56:09 -0700 Subject: [PATCH 1/2] ASIO can call associated_allocator::get with only one parameter --- include/exec/asio/completion_token.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/asio/completion_token.hpp b/include/exec/asio/completion_token.hpp index a725b9041..3c7dc3643 100644 --- a/include/exec/asio/completion_token.hpp +++ b/include/exec/asio/completion_token.hpp @@ -628,7 +628,7 @@ namespace ASIOEXEC_ASIO_NAMESPACE static type get(::exec::asio::detail::completion_token::completion_handler const & h, - Allocator const &) noexcept + ::STDEXEC::__ignore = {}) noexcept { return ::STDEXEC::get_allocator(::STDEXEC::get_env(h.state().r_)); } From e3807bfb225345c9ee7264da351ebb913f5e0923 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Fri, 20 Mar 2026 12:21:41 -0700 Subject: [PATCH 2/2] add a test for awaitability from STDEXEC::task --- test/exec/asio/test_use_sender.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/exec/asio/test_use_sender.cpp b/test/exec/asio/test_use_sender.cpp index f14c7d572..9fe7614b9 100644 --- a/test/exec/asio/test_use_sender.cpp +++ b/test/exec/asio/test_use_sender.cpp @@ -270,4 +270,21 @@ namespace CHECK(ctx.stopped()); } +#if !STDEXEC_NO_STDCPP_COROUTINES() + template + ::STDEXEC::task test_awaitable_in_stdexec_task(Timer& timer) + { + co_await timer.async_wait(::asio_impl::as_tuple(exec::asio::use_sender)); + } + + TEST_CASE("Can await an Asio-based asynchronous operation which uses use_sender as its " + "completion token from a stdexec task", + "[asioexec][use_sender]") + { + ::asio_impl::io_context ctx; + ::asio_impl::steady_timer timer(ctx); + CHECK_NOTHROW(test_awaitable_in_stdexec_task(timer)); + } +#endif // !STDEXEC_NO_STDCPP_COROUTINES() + } // namespace