Bug 1560207 - Give Refcountable assignment operators. r=jib

Depends on D36191

Differential Revision: https://phabricator.services.mozilla.com/D36192

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Pehrson 2019-07-05 22:11:22 +00:00
parent b5260f58d6
commit 995ee35634

View File

@ -116,6 +116,16 @@ class Refcountable : public T, public RefcountableBase {
return RefcountableBase::Release();
}
Refcountable<T>& operator=(T&& aOther) {
T::operator=(std::move(aOther));
return *this;
}
Refcountable<T>& operator=(T& aOther) {
T::operator=(aOther);
return *this;
}
private:
~Refcountable<T>() {}
};