diff --git a/src/util/ScopeExit.hxx b/src/util/ScopeExit.hxx index 0fecf6c1e..8dc0e2c70 100644 --- a/src/util/ScopeExit.hxx +++ b/src/util/ScopeExit.hxx @@ -40,9 +40,9 @@ class ScopeExitGuard : F { bool enabled = true; public: - explicit ScopeExitGuard(F &&f):F(std::forward(f)) {} + explicit ScopeExitGuard(F &&f) noexcept:F(std::forward(f)) {} - ScopeExitGuard(ScopeExitGuard &&src) + ScopeExitGuard(ScopeExitGuard &&src) noexcept :F(std::move(src)), enabled(src.enabled) { src.enabled = false; } @@ -68,7 +68,7 @@ struct ScopeExitTag { parantheses at the end of the expression AtScopeExit() call */ template - ScopeExitGuard operator+(F &&f) { + ScopeExitGuard operator+(F &&f) noexcept { return ScopeExitGuard(std::forward(f)); } };