promise(); | (1) | (since C++11) |
template< class Alloc > promise( std::allocator_arg_t, const Alloc& alloc ); | (2) | (since C++11) |
promise( promise&& other ) noexcept; | (3) | (since C++11) |
promise( const promise& other ) = delete; | (4) | (since C++11) |
Constructs a promise object.
alloc. Alloc must meet the requirements of Allocator.other using move semantics. After construction, other has no shared state.promise is not copyable.| alloc | - | allocator to use to allocate the shared state |
| other | - | another promise to acquire the state from |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/thread/promise/promise