Allow intrusive_ptr::reset to take a new pointer

This commit is contained in:
Chris Robinson 2020-08-22 22:42:56 -07:00
parent de060ce09a
commit 01f76f2b67

@ -80,11 +80,11 @@ public:
T* operator->() const noexcept { return mPtr; }
T* get() const noexcept { return mPtr; }
void reset() noexcept
void reset(T *ptr=nullptr) noexcept
{
if(mPtr)
mPtr->release();
mPtr = nullptr;
mPtr = ptr;
}
T* release() noexcept