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:
@@ -72,6 +72,11 @@ public:
|
||||
}
|
||||
|
||||
box_ptr(box_ptr<T> & other) = delete;
|
||||
|
||||
std::unique_ptr<T> take() &&
|
||||
{
|
||||
return std::move(inner);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
||||
Reference in New Issue
Block a user