Construct a std::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::promiseinstance with an associated asynchronous result of typeResultTypethat is not ready. The memory for the asynchronous result is allocated through the allocatoralloc.- Throws:
Any exception thrown by the allocator when attempting to allocate memory for the asynchronous result.
Header
#include <future>