首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::shared_future::shared_future

shared_future();

(1)

(since C++11)

shared_future( const shared_future& other );

(2)

(since C++11)

shared_future( std::future<T>&& other );

(3)

(since C++11)

shared_future( shared_future&& other );

(4)

(since C++11)

构造一个新的shared_future...

1%29默认构造函数。构造一个空的共享未来,它的%27T引用共享状态,即valid() == false...

2%29构造一个引用相同共享状态的共享未来,如other,如果有%27s的话。

3-4%29传输由other*this.施工后,other->valid() == false,也valid()返回与other.valid()在建造之前就会回来。

参数

other

-

another future object to initialize with

例外

1%29

noexcept规格:

noexcept

2) (none)

(until C++17)

2) noexcept specification: noexcept

(since C++17)

3-4%29

noexcept规格:

noexcept

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com