29 template<
typename LeftSig,
typename RightSig>
32 using Left_f = std::function<LeftSig>;
33 using Right_f = std::function<RightSig>;
51 template<
typename L,
typename R>
65 explicit operator bool ()
const
67 return Left_ && Right_;
83 template<
typename... Args>
84 auto Left (Args&&... args)
const
86 return Left_ (std::forward<Args> (args)...);
102 template<
typename... Args>
105 return Right_ (std::forward<Args> (args)...);
auto Right(Args &&... args) const
Invoke the right function and return its result.
auto Left(Args &&... args) const
Invoke the left function and return its result.
EitherCont(const L &l, const R &r)
Sets the left and right functions to l and r.
EitherCont()=default
Default-constructs the continuation with uninitialized functions.