在线文档教程
C++
线程支持 | Thread support

std::shared_future::shared_future

STD::共享[医]未来::共享[医]未来

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

© cppreference.com

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

http://en.cppreference.com/w/cpp/线程/Shared[医]未来/共享[医]未来