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"); } }