Documentation Home >> Headers >> <jss/experimental_future.hpp> Header >> std::experimental::future >> std::experimental::future<>::has_value Member function

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

bool has_value() const;

Preconditions:

this->valid() would return true.

Returns:

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

Throws:

Nothing.

Header

#include <experimental/future>

See Also