24 #if defined (ONIXS_B3_BOE_CXX11) 31 class FutureSharedState;
52 namespace Implementation {
91 #if defined (ONIXS_B3_BOE_CXX11) 101 enum { InfiniteTimeout = -1 };
119 #if defined (ONIXS_B3_BOE_CXX11) 147 const System::FutureSharedState * state_;
149 friend class FutureHelper;
188 template <
typename T>
197 : FutureBase(other) {}
201 FutureBase::operator=(other);
205 #if defined (ONIXS_B3_BOE_CXX11) 208 : FutureBase(
std::move(other)) {}
211 FutureBase::operator=(std::move(other));
223 return *
reinterpret_cast<const T *
>(getValuePtr());
228 FutureBase::swap(other);
234 : FutureBase(state) {}
238 : FutureBase(state, t) {}
240 friend class Implementation::FutureHelper;
Base implementation of SharedFuture<T>.
#define ONIXS_B3_BOE_NULLPTR
#define ONIXS_B3_BOE_NOTHROW
Represents a future result of an asynchronous operation - a result that will eventually appear in the...
State of a SharedFuture object (similar to std::future_status,.
#define ONIXS_B3_BOE_EXPORTED
SharedFuture< T > & operator=(const SharedFuture< T > &other) noexcept
Copy assignment.
the shared state is ready.
SharedFuture(SharedFuture< T > &&other) noexcept
FutureBase & operator=(SharedFuture< T > &&other) noexcept
the shared state did not become ready before specified timeout duration has passed.
SharedFuture(const SharedFuture< T > &other) noexcept
Copy constructor.
void swap(SharedFuture< T > &other) noexcept
swaps two SharedFuture objects
bool valid() const noexcept
Check if a future instance is associated with an asynchronous result.