From 9135bab70e312ff33e6b41fc25b5d9b7964e0ea6 Mon Sep 17 00:00:00 2001 From: microcai Date: Mon, 28 Oct 2024 22:47:08 +0800 Subject: [PATCH] x --- include/ucoro/awaitable.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/ucoro/awaitable.hpp b/include/ucoro/awaitable.hpp index a06864f..2aae82b 100644 --- a/include/ucoro/awaitable.hpp +++ b/include/ucoro/awaitable.hpp @@ -132,6 +132,8 @@ namespace ucoro await_transformer::await_transform(std::move(a)); }; + template + struct is_not_awaitable : std::false_type{}; } // namespace concepts @@ -361,7 +363,7 @@ namespace ucoro } else { - static_assert(0, "co_await must be called on an awaitable type"); + static_assert(concepts::is_not_awaitable::value, "co_await must be called on an awaitable type"); } }