std::experimental::make_ready_future_C++中文网
| 定义于头文件 |
||
| template < class T > |
(1) | (并发 TS) |
| future<void> make_ready_future(); |
(2) | (并发 TS) |
1) 若 std::decay_t<T> 为 std::reference_wrapper<X> ,则 V 为 X& ,否则 V 为 std::decay_t<T> 。
创建立即就绪的 V 类型共享状态,从 std::forward<T>(value) 构造结果,然后返回与该共享状态关联的 std::experimental::future 。
2) 创建立即就绪的 void 类型共享状态,然后返回与该共享状态关联的 std::experimental::future 。
返回值
与创建的共享状态关联的 std::experimental::future 。
参阅
| (并发 TS) |
产生立即就绪并保有给定异常的 future (函数模板) |