std::future<T>::future - cppreference.com
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
future() noexcept; |
(1) | (C++11 起) |
future( future&& other ) noexcept; |
(2) | (C++11 起) |
future( const future& other ) = delete; |
(3) | (C++11 起) |
构造 std::future 对象。
1) 默认构造函数。构造无共享状态的 std::future。构造后,valid() == false。
2) 移动构造函数。用移动语义,以 other 的共享状态构造 std::future。构造后 other.valid() == false。
3) std::future 不可复制构造 (CopyConstructible) 。
参数
| other | - | 从之获得共享状态的另一 std::future
|