std::experimental::shared_future::shared_future

From cppreference.com

shared_future(future<shared_future<T>> && other);

Constructs a shared_future object from the shared state referred to by other. The resulting shared_future object becomes ready when one of the following happens:

  • other and other.get() are both ready. The value or exception from other.get() is stored in the shared state associated with the resulting shared_future object.
  • other is ready, but other.get() is invalid. An exception of type std::future_error with an error condition of std::future_errc::broken_promise is stored in the shared state associated with the resulting shared_future object.

After this constructor returns, valid() == true and other.valid() == false.

Contents

[edit] Parameters

other - A std::experimental::future object to unwrap

[edit] Exceptions

noexcept specification:  
noexcept
  

[edit] Notes

For other constructors, see the documentation for std::shared_future's constructor.

[edit] Example

[edit] See also

constructs the future object
(public member function of std::shared_future)