summaryrefslogtreecommitdiff
path: root/asl/status_or.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'asl/status_or.hpp')
-rw-r--r--asl/status_or.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/asl/status_or.hpp b/asl/status_or.hpp
index cb65147..ec76e47 100644
--- a/asl/status_or.hpp
+++ b/asl/status_or.hpp
@@ -127,6 +127,8 @@ public:
constexpr string_view message() const { return m_status.message(); }
+ constexpr status&& throw_status() && { return ASL_MOVE(m_status); }
+
// @Todo(C++23) Deducing this
constexpr const T& value() const&
{
@@ -160,6 +162,11 @@ public:
return ok() ? ASL_MOVE(value()) : static_cast<T>(ASL_FWD(other_value));
}
+ friend void AslFormat(Formatter& f, const status_or& status)
+ {
+ AslFormat(f, status.m_status);
+ }
+
template<typename H>
requires hashable<T>
friend H AslHashValue(H h, const status_or& s)