[mammoth] Return ErrorOr when creating a process

This commit is contained in:
Drew Galbraith 2023-06-21 20:58:08 -07:00
parent 0ec2fa3e76
commit 1f7a15eed4
4 changed files with 12 additions and 6 deletions

View file

@ -10,6 +10,8 @@ class ErrorOr {
ErrorOr() = delete;
ErrorOr(const ErrorOr&) = delete;
ErrorOr(ErrorOr&&) = delete;
// FIXME: Do we have to call ~T manually here.
~ErrorOr() {}
ErrorOr(ErrorCode code) : error_(code), ok_(false) {}
ErrorOr(const T& obj) : obj_(obj), ok_(true) {}