cpp/thread/packaged task/operator()

Calls the stored task as if by, where is the stored task. The return value of the task or any exceptions thrown are stored in the shared state. The shared state is made ready and any threads waiting for this are unblocked.

Return value
(none)

Exceptions
std on the following error conditions:
 * The stored task has already been invoked. The error category is set to.
 * has no shared state. The error category is set to.