diff --git a/src/util.h b/src/util.h index b0e4d3d7820c1a..c2ae527d6f5123 100644 --- a/src/util.h +++ b/src/util.h @@ -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: