Construct a std::promise object.
promise();
- Effects:
Constructs a
std::promiseinstance with an associated asynchronous result of typeResultTypethat is not ready.- Throws:
An exception of type
std::bad_allocif the constructor is unable to allocate memory for the asynchronous result.
Header
#include <future>