5 #ifndef DOXYGEN_SKIP_PROPERTY
24 counted_ptr<state_base_t> _state;
30 template<
class _Ty,
class = std::
void_t<>>
33 #ifndef DOXYGEN_SKIP_PROPERTY
35 struct task_impl_t<_Ty, std::void_t<traits::is_future<std::remove_reference_t<_Ty>>>> :
public task_t
37 using future_type = std::remove_reference_t<_Ty>;
38 using value_type =
typename future_type::value_type;
39 using state_type = state_t<value_type>;
41 task_impl_t() =
default;
42 task_impl_t(future_type& f)
47 void initialize(future_type& f)
49 _state = f._state.get();
54 struct task_impl_t<generator_t<_Ty>> :
public task_t
56 using value_type = _Ty;
57 using future_type = generator_t<value_type>;
58 using state_type = state_generator_t;
60 task_impl_t() =
default;
61 task_impl_t(future_type& f)
66 void initialize(future_type& f)
68 _state = f.detach_state();
78 struct task_ctx_impl_t :
public task_impl_t<remove_cvref_t<decltype(std::declval<_Ctx>()())>>
80 using context_type = _Ctx;
82 context_type _context;
84 task_ctx_impl_t(context_type ctx)
85 : _context(std::move(ctx))
87 decltype(
auto) f = _context();
91 #endif //DOXYGEN_SKIP_PROPERTY