promise();
|
(1) | (C++11 起) |
template< class Alloc >
promise( std::allocator_arg_t, const Alloc& alloc ); |
(2) | (C++11 起) |
promise( promise&& other ) noexcept;
|
(3) | (C++11 起) |
promise( const promise& other ) = delete;
|
(4) | (C++11 起) |
构造 std::promise
对象。
std::promise
;other
的共享状态构造新的 std::promise
对象,使用移动语义。构造完毕后, other
无共享状态;std::promise
不可复制。alloc | - | 分配器,用于分配共享状态; |
other | - | 另一 std::promise 对象,作为获得共享状态的来源。
|