Bug 1725572 - Part 1: Support move-only closures in ScopeExit, r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D125895
This commit is contained in:
Nika Layzell 2021-09-23 18:54:31 +00:00
parent e339f4f212
commit a67a90d1c3

View file

@ -93,7 +93,7 @@ class MOZ_STACK_CLASS ScopeExit {
public:
explicit ScopeExit(ExitFunction&& cleanup)
: mExitFunction(cleanup), mExecuteOnDestruction(true) {}
: mExitFunction(std::move(cleanup)), mExecuteOnDestruction(true) {}
ScopeExit(ScopeExit&& rhs)
: mExitFunction(std::move(rhs.mExitFunction)),