Documentation Home >> Headers >> <jss/experimental_future.hpp> Header >> std::experimental::promise >> std::experimental::promise Allocator Constructor

Construct a std::experimental::promise object, using the supplied allocator to allocate memory for the associated asynchronous result.

template<typename Allocator>
promise(std::allocator_arg_t, Allocator const& alloc);

Effects:

Constructs a std::experimental::promise instance with an associated asynchronous result of type ResultType that is not ready. The memory for the asynchronous result is allocated through the allocator alloc.

Throws:

Any exception thrown by the allocator when attempting to allocate memory for the asynchronous result.

Header

#include <experimental/future>

See Also