50 template<
typename LeftSig,
typename RightSig>
53 using Left_f = std::function<LeftSig>;
54 using Right_f = std::function<RightSig>;
72 template<
typename L,
typename R>
86 explicit operator bool ()
const 88 return Left_ && Right_;
104 template<
typename... Args>
105 auto Left (Args&&... args)
const 107 return Left_ (std::forward<Args> (args)...);
123 template<
typename... Args>
126 return Right_ (std::forward<Args> (args)...);
EitherCont(const L &l, const R &r)
Sets the left and right functions to l and r.
auto Right(Args &&... args) const
Invoke the right function and return its result.
A peir of two functions, typically a continuation and an error handler.
EitherCont()=default
Default-constructs the continuation with uninitialized functions.
auto Left(Args &&... args) const
Invoke the left function and return its result.