A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/shared_future::valid below:

public member function

<future>

std::shared_future::valid
bool valid() const noexcept;

Check for valid shared state

Returns whether the shared_future object is currently associated with a shared state or not.

For default-constructed shared_future objects, this function returns false (unless assigned a valid shared_future).

Shared futures obtain valid shared states either from a future or shared_future object (on construction or assigning them). Unlike future objects, they retain the same shared state association and validity until destroyed (or assigned).



Parameters none

Return valuetrue if the object is associated with a shared state.
false otherwise.

Data races The shared_future object is accessed.

Exception safetyNo-throw guarantee: never throws exceptions.

See also
shared_future::get
Get value (public member function)
shared_future::wait
Wait for ready (public member function)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4