From d5dc31e284305c3e7923397c3aa9ffd88fd715fb Mon Sep 17 00:00:00 2001 From: BowDown097 <42720004+BowDown097@users.noreply.github.com> Date: Sun, 9 Jun 2024 20:20:12 -0700 Subject: [PATCH] Add result_type member type to dpp::task --- include/dpp/coro/task.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/dpp/coro/task.h b/include/dpp/coro/task.h index 5cdf4577d1..6e6be73c50 100644 --- a/include/dpp/coro/task.h +++ b/include/dpp/coro/task.h @@ -292,6 +292,11 @@ class task : private detail::task::task_base { */ friend class detail::task::task_base; + /** + * @brief The type of the result produced by this task. + */ + using result_type = R; + /** * @brief Function called by the standard library when the coroutine is resumed. * @@ -450,6 +455,11 @@ class task : private detail::task::task_base { */ friend class detail::task::task_base; + /** + * @brief The type of the result produced by this task. + */ + using result_type = void; + /** * @brief Function called by the standard library when the coroutine is resumed. *