From 19f08786f0490de8e560d7f761b3166005a2d16d Mon Sep 17 00:00:00 2001 From: Martin Chang Date: Sun, 18 Dec 2022 15:12:32 +0800 Subject: [PATCH] mark awaiters as non copyable (#1457) --- lib/inc/drogon/utils/coroutine.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/inc/drogon/utils/coroutine.h b/lib/inc/drogon/utils/coroutine.h index da6dc11a..6a35134f 100644 --- a/lib/inc/drogon/utils/coroutine.h +++ b/lib/inc/drogon/utils/coroutine.h @@ -14,6 +14,7 @@ #pragma once #include +#include #include #include #include @@ -478,7 +479,7 @@ struct AsyncTask /// coroutines // The user is responsible to fill in `await_suspend()` and constructors. template -struct CallbackAwaiter +struct CallbackAwaiter : public trantor::NonCopyable { bool await_ready() noexcept { @@ -520,7 +521,7 @@ struct CallbackAwaiter }; template <> -struct CallbackAwaiter +struct CallbackAwaiter : public trantor::NonCopyable { bool await_ready() noexcept {