tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
coroutine_traits.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_COROUTINE_COROUTINE_TRAITS_HPP
4#define TETL_COROUTINE_COROUTINE_TRAITS_HPP
5
7
8#if defined(__cpp_coroutines)
9
10namespace etl {
11
12namespace detail {
13template <typename R, typename = void>
14struct coro_traits { };
15
16template <typename R>
17struct coro_traits<R, void_t<typename R::promise_type>> {
18 using promise_type = typename R::promise_type;
19};
20} // namespace detail
21
23template <typename R, typename... Args>
24struct coroutine_traits : detail::coro_traits<R> { };
25
26} // namespace etl
27
28#endif // defined(__cpp_coroutines)
29
30#endif // TETL_COROUTINE_COROUTINE_TRAITS_HPP
void void_t
Definition void_t.hpp:10
Definition adjacent_find.hpp:8
Definition coroutine_traits.hpp:24