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);


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.


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


#include <experimental/future>

See Also