33 template<
typename R,
typename E>
41 Outcome(
const R& r) : result(r), success(true)
44 Outcome(
const E& e) : error(e), success(false)
47 Outcome(R&& r) : result(
std::forward<R>(r)), success(true)
50 Outcome(E&& e) : error(
std::forward<E>(e)), success(false)
73 result(
std::move(o.result)),
74 error(
std::move(o.error)),
83 result = std::move(o.result);
84 error = std::move(o.error);
107 return std::move(result);
117 return this->success;
R && GetResultWithOwnership()
Outcome & operator=(Outcome &&o)
Outcome & operator=(const Outcome &o)
const E & GetError() const
const R & GetResult() const
Outcome(const Outcome &o)
JSON (JavaScript Object Notation).