Przeglądaj źródła

Merge pull request #2391 from lioncash/scope

common/scope_exit: Replace std::move with std::forward in ScopeExit()
bunnei 7 lat temu
rodzic
commit
b42595fa6b
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/common/scope_exit.h

+ 1 - 1
src/common/scope_exit.h

@@ -20,7 +20,7 @@ struct ScopeExitHelper {
 
 template <typename Func>
 ScopeExitHelper<Func> ScopeExit(Func&& func) {
-    return ScopeExitHelper<Func>(std::move(func));
+    return ScopeExitHelper<Func>(std::forward<Func>(func));
 }
 } // namespace detail