Added NotNullable::release() function.

This commit is contained in:
Patrick Wuttke 2025-07-14 17:16:09 +02:00
parent 4a9a60c7f5
commit ad627b7c70

View File

@ -160,6 +160,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;
};