43#if defined DISPENSO_DEBUG
44 : onceCallable_(
nullptr)
57 OnceFunction(F&& f) : onceCallable_(detail::createOnceCallable(std::forward<F>(f))) {}
62#if defined DISPENSO_DEBUG
63 other.onceCallable_ =
nullptr;
68 onceCallable_ = other.onceCallable_;
69#if defined DISPENSO_DEBUG
71 other.onceCallable_ =
nullptr;
82#if defined DISPENSO_DEBUG
83 assert(onceCallable_ !=
nullptr &&
"Must not use OnceFunction more than once!");
88#if defined DISPENSO_DEBUG
89 onceCallable_ =
nullptr;
94 OnceFunction(detail::OnceCallable* func,
bool) : onceCallable_(func) {}
96 mutable detail::OnceCallable* onceCallable_;
98 template <
typename Result>
99 friend class detail::FutureBase;
100 template <
typename Result>
101 friend class detail::FutureImplBase;