diff --git a/repos/base/include/util/attempt.h b/repos/base/include/util/attempt.h index 5aa3eb6e3a..d1252efd3d 100644 --- a/repos/base/include/util/attempt.h +++ b/repos/base/include/util/attempt.h @@ -72,6 +72,12 @@ class Genode::Attempt fail_fn(_error); } + bool operator == (ERROR const &rhs) const { + return failed() && (_error == rhs); } + + bool operator == (RESULT const &rhs) const { + return ok() && (_result == rhs); } + bool ok() const { return _ok; } bool failed() const { return !_ok; } };