bool valid() const;
Checks if the future refers to a shared state.
This is the case only for futures that were not default-constructed or moved from (i.e. returned by
std::async()) until the first time
share() is called.
The behavior is undefined if any member function other than the destructor, the move-assignment operator, or
valid is called on a
future that does not refer to shared state (although implementations are encouraged to throw
no_state in this case). It is valid to move from a future object for which
true if *this refers to a shared state, otherwise
| waits for the result to become available
(public member function)
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.