Template:cpp/thread/future/get

The member function waits until the  has a valid result and (depending on which template is used) retrieves it. It effectively calls wait in order to wait for the result.

The generic template and two template specializations each contain a single version of. The three versions of differ only in the return type.

The behavior is undefined if valid is before the call to this function.

Parameters
(none)

Return value
@2@ The reference stored as value in the shared state.

@3@ Nothing.

Exceptions
If an exception was stored in the shared state referenced by the future (e.g. via a call to ) then that exception will be thrown.