Add cppcoro::is_awaitable_v<T> variable template.

This commit is contained in:
Lewis Baker 2017-09-13 07:10:03 +09:30
parent 2f8469bd96
commit f100b25869

View file

@ -18,6 +18,9 @@ namespace cppcoro
struct is_awaitable<T, std::void_t<decltype(cppcoro::detail::get_awaiter(std::declval<T>()))>>
: std::true_type
{};
template<typename T>
constexpr bool is_awaitable_v = is_awaitable<T>::value;
}
#endif