diff --git a/src/utils/utils.hpp b/src/utils/utils.hpp index faf576b..fead205 100644 --- a/src/utils/utils.hpp +++ b/src/utils/utils.hpp @@ -283,7 +283,8 @@ namespace detail { F f; bool active; public: - scope_guard(F&& f) : f(std::forward(f)), active(true) {} + template + scope_guard(G&& f) : f(std::forward(f)), active(true) {} ~scope_guard() { if(active) { f();