Browse Source
Merge pull request #2391 from lioncash/scope
common/scope_exit: Replace std::move with std::forward in ScopeExit()
pull/15/merge
bunnei
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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 |
|
|
|
|
|
|
|
|