Give a chance to construct an ObjectPtr by moving source

This commit is contained in:
emeric
2024-04-13 14:26:54 +02:00
parent e6e8a6eac5
commit cd5569db2f
@@ -31,7 +31,8 @@ namespace lms::db
{
public:
ObjectPtr() = default;
ObjectPtr(Wt::Dbo::ptr<T> obj) : _obj{ obj } {}
ObjectPtr(const Wt::Dbo::ptr<T>& obj) : _obj{ obj } {}
ObjectPtr(Wt::Dbo::ptr<T>&& obj) : _obj{ std::move(obj) } {}
const T* operator->() const { return _obj.get(); }
operator bool() const { return _obj.get(); }