From 657d05341c91e7233f22b0db7ce0eee30fb89182 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Mon, 14 Jul 2025 17:16:09 +0200 Subject: [PATCH] Added NotNullable::release() function. --- source/mijin/util/annot.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/mijin/util/annot.hpp b/source/mijin/util/annot.hpp index 471afca..6ee18e4 100644 --- a/source/mijin/util/annot.hpp +++ b/source/mijin/util/annot.hpp @@ -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 friend class NotNullable; };