Retrieves the result that is stored in the associated asynchronous state.
Before it retrieves the result, this method blocks the current thread until the associated asynchronous state is ready.
For the partial specialization future<Ty&>, the stored value is effectively a reference to the object that was passed to the asynchronous provider as the return value.
Because no stored value exists for the specialization future<void>, the method returns void.
In other specializations, the method moves its return value from the stored value. Therefore, call this method only once.