Documentation Home >> Headers >> <future> Header >> std::shared_future >> std::shared_future<>::has_exception Member function

Check if the asynchronous result associated with an instance of std::shared_future is ready, and has a stored exception.

bool has_exception() const;

Preconditions:

this->valid() would return true.

Returns:

true if the asynchronous result associated with *this is ready and has a stored exception, false otherwise.

Throws:

Nothing.

Header

#include <future>

See Also