librf
Public 成员函数 | Public 属性 | 所有成员列表
resumef::awaitable_impl_t< _Ty > 模板结构体 参考

awaitable_t<>的公共实现部分,用于减少awaitable_t<>的重复代码。 更多...

类 resumef::awaitable_impl_t< _Ty > 继承关系图:
resumef::awaitable_t< _Ty >

Public 成员函数

void set_exception (std::exception_ptr e) const
 发生了异常后,设置异常。 更多...
 
template<class _Exp >
void throw_exception (_Exp e) const
 在协程内部,重新抛出之前设置的异常。
 
future_type get_future () noexcept
 获得与之关联的future_t<>对象,作为可等待函数(awaitable function)的返回值。
 

Public 属性

counted_ptr< state_type_state = state_future_t::_Alloc_state<state_type>(true)
 管理的state_t<>对象。
 

详细描述

template<class _Ty>
struct resumef::awaitable_impl_t< _Ty >

awaitable_t<>的公共实现部分,用于减少awaitable_t<>的重复代码。

参数
_Ty可等待函数(awaitable function)的返回类型。
参见
参见awaitable_t<>类的说明。

成员函数说明

◆ set_exception()

template<class _Ty >
void resumef::awaitable_impl_t< _Ty >::set_exception ( std::exception_ptr  e) const
inline

发生了异常后,设置异常。

注意
与set_value()互斥。调用了set_exception(e)后,不能再调用set_value()。

该结构体的文档由以下文件生成: