If the associated state contains a deferred function from a call to
std::experimental::async then invoke that function
and return the result, otherwise wait until the asynchronous result associated
with an instance of
std::experimental::future is ready, and then return
the stored value or throw the stored exception.
void future<void>::get(); R& future<R&>::get(); R future<R>::get();
If the state associated with
*this contains a deferred function,
invoke the deferred function and return the result or propagate
any thrown exception.
Otherwise, block until the asynchronous result associated with
is ready. If the result is a stored exception
then throw that exception. Otherwise return the stored value.
If the associated state contains a deferred function then the result
of the function invocation. Otherwise, if
void then return
for some type
then return the stored reference. Otherwise, return the stored
The exception thrown by the deferred exception, or stored in the asynchronous result, if any.