Added NotNullable::release() function.
This commit is contained in:
parent
4a9a60c7f5
commit
ad627b7c70
@ -160,6 +160,9 @@ public:
|
|||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr const T& get() const MIJIN_NOEXCEPT { return base_; }
|
constexpr const T& get() const MIJIN_NOEXCEPT { return base_; }
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
constexpr T release() && MIJIN_NOEXCEPT { return std::exchange(base_, nullptr); }
|
||||||
|
|
||||||
template<nullable_type TOther>
|
template<nullable_type TOther>
|
||||||
friend class NotNullable;
|
friend class NotNullable;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user