Documentation Home >> Headers >> <future> Header >> std::promise >> std::promise Default Constructor

Construct a std::promise object.

promise();

Effects:

Constructs a std::promise instance with an associated asynchronous result of type ResultType that is not ready.

Throws:

An exception of type std::bad_alloc if the constructor is unable to allocate memory for the asynchronous result.

Header

#include <future>

See Also