From 240c0cc66aaf6688a7180b7dd04c82efc159a478 Mon Sep 17 00:00:00 2001 From: Ian Petersen Date: Tue, 14 May 2024 10:13:51 -0700 Subject: [PATCH] Make the connect_awaitable opstate immovable I noticed while doing other things that the opstate returned from `connect_awaitable()` has a move constructor. This diff deletes it. --- include/unifex/connect_awaitable.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/unifex/connect_awaitable.hpp b/include/unifex/connect_awaitable.hpp index b5b1ef43..3ec21c8f 100644 --- a/include/unifex/connect_awaitable.hpp +++ b/include/unifex/connect_awaitable.hpp @@ -110,7 +110,7 @@ class _sender_task::type { explicit type(coro::coroutine_handle coro) noexcept : coro_(coro) {} - type(type&& other) noexcept : coro_(std::exchange(other.coro_, {})) {} + type(type&&) = delete; ~type() { if (coro_)