diff --git a/src/util/ScopeExit.hxx b/src/util/ScopeExit.hxx index a53282676..b50468702 100644 --- a/src/util/ScopeExit.hxx +++ b/src/util/ScopeExit.hxx @@ -50,7 +50,7 @@ public: "noexcept" declaration allows the destructor to throw if the function can throw; without this, a throwing function would std::terminate() */ - ~ScopeExitGuard() noexcept(noexcept(F::operator()())) { + ~ScopeExitGuard() noexcept(noexcept(std::declval()())) { if (enabled) F::operator()(); }