Associate a std::packaged_task instance with
a new asynchronous result for the same task.
void reset();
- Preconditions:
*thishas an associated asynchronous task.- Effects:
Allocate a new asynchronous result for the task associated with
*this.- Postconditions:
If the asynchronous result associated with
*thisprior to the call is not ready, that asynchronous result is ready with a stored exception of typestd::future_errorand an error code of __broken_packagedtask_.*thishas a new asynchronous result with no associated futures, and which is not ready.- Throws:
An exception of type
std::bad_allocif memory could not be allocated for the new asynchronous result.
Header
#include <future>