Added NotNullable::release() function.

This commit is contained in:
Patrick Wuttke 2025-07-14 17:16:09 +02:00 committed by Patrick Wuttke
parent 9cefc52568
commit 657d05341c

View File

@ -170,6 +170,9 @@ public:
[[nodiscard]]
constexpr const T& get() const MIJIN_NOEXCEPT { return base_; }
[[nodiscard]]
constexpr T release() && MIJIN_NOEXCEPT { return std::exchange(base_, nullptr); }
template<nullable_type TOther>
friend class NotNullable;
};