Skip to content

Commit

Permalink
src: remove OnScopeLeaveImpl's move assignment overload
Browse files Browse the repository at this point in the history
... as it's not valid implementation and also has not been used

PR-URL: #48732
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
CGQAQ authored and RafaelGSS committed Aug 15, 2023
1 parent 41cc3ef commit 07d0fd6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,6 @@ struct OnScopeLeaveImpl {
: fn_(std::move(other.fn_)), active_(other.active_) {
other.active_ = false;
}
OnScopeLeaveImpl& operator=(OnScopeLeaveImpl&& other) {
if (this == &other) return *this;
this->~OnScopeLeave();
new (this)OnScopeLeaveImpl(std::move(other));
return *this;
}
};

// Run a function when exiting the current scope. Used like this:
Expand Down

0 comments on commit 07d0fd6

Please sign in to comment.