libutil: add box_ptr<T>::take

sometimes it's useful to turn a box into a unique_ptr. let's have that.

Change-Id: I3d142c6e157c5e61c16f3953b3b8b4cd616f0e93
This commit is contained in:
eldritch horrors
2025-03-03 20:48:59 +01:00
parent bcea854b1f
commit 3844e34053
+5
View File
@@ -72,6 +72,11 @@ public:
}
box_ptr(box_ptr<T> & other) = delete;
std::unique_ptr<T> take() &&
{
return std::move(inner);
}
};
template<typename T>