promise::promise Constructor

Constructs a promise object.

promise();
template<class Alloc>
promise(
   allocator_arg_t,
   const Alloc& Al
);
promise(
   promise&& Other
) _NOEXCEPT;

Al

A memory allocator. See <allocators> for more information.

Other

A promise object.

The first constructor constructs an empty promise object.

The second constructor constructs an empty promise object and uses Al for memory allocation.

The third constructor constructs a promise object and transfers the associated asynchronous state from Other, and leaves Other empty.

Header: future

Namespace: std

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft