public member function
<future>

std::promise::~promise

~promise();
Destroy promise
Abandons the shared state (if any) and destroys the promise object.

Note that if other (future) objects are associated to the same shared state, the shared state is itself not destroyed (until all those objects also release it).

If the object is destroyed before its shared state has been made ready (by explicitly setting a value or reference to it), the shared state is automatically made ready containing an exception of type future_error (with a broken_promise error condition).

Exception safety

No-throw guarantee: never throws exceptions.