diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h index baf1f1c9e..1176a72b1 100644 --- a/src/common/scope_exit.h +++ b/src/common/scope_exit.h @@ -20,7 +20,7 @@ struct ScopeExitHelper { template ScopeExitHelper ScopeExit(Func&& func) { - return ScopeExitHelper(std::move(func)); + return ScopeExitHelper(std::forward(func)); } } // namespace detail