Add cppcoro::is_awaitable_v<T> variable template.
This commit is contained in:
parent
2f8469bd96
commit
f100b25869
|
@ -18,6 +18,9 @@ namespace cppcoro
|
||||||
struct is_awaitable<T, std::void_t<decltype(cppcoro::detail::get_awaiter(std::declval<T>()))>>
|
struct is_awaitable<T, std::void_t<decltype(cppcoro::detail::get_awaiter(std::declval<T>()))>>
|
||||||
: std::true_type
|
: std::true_type
|
||||||
{};
|
{};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
constexpr bool is_awaitable_v = is_awaitable<T>::value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue