self-hosting
MoAlyousef 4 years ago
parent 0294b95cfc
commit 76a4367b57

@ -6,7 +6,9 @@ namespace cmkr::error {
Status::Status(Code ec) noexcept : ec_(ec) {} Status::Status(Code ec) noexcept : ec_(ec) {}
Status::operator int() noexcept { return static_cast<int>(ec_); } Status::operator int() const noexcept { return static_cast<int>(ec_); }
Status::Code Status::code() const noexcept { return ec_; }
} // namespace cmkr::error } // namespace cmkr::error

@ -12,7 +12,8 @@ struct Status {
BuildError, BuildError,
}; };
Status(Code ec) noexcept; Status(Code ec) noexcept;
operator int() noexcept; operator int() const noexcept;
Code code() const noexcept;
private: private:
Code ec_ = Code::Success; Code ec_ = Code::Success;

Loading…
Cancel
Save