std::shared_future<T>::get

The get member function waits (by calling wait()) until the shared state is ready, then retrieves the value stored in the shared state (if any).

# Declarations

Main template
const T& get() const;

(since C++11)

std::shared_future<T&> specializations
T& get() const;

(since C++11)

std::shared_future<void> specialization
void get() const;

(since C++11)

# Notes

The C++ standard recommends the implementations to detect the case when valid() is false before the call and throw a std::future_error with an error condition of std::future_errc::no_state.

# Example

This section is incompleteReason: no example

# See also