diff --git a/src/utils/utils.hpp b/src/utils/utils.hpp index fead205..afdd9f8 100644 --- a/src/utils/utils.hpp +++ b/src/utils/utils.hpp @@ -283,7 +283,10 @@ namespace detail { F f; bool active; public: - template + template< + typename G, + typename std::enable_if::type, scope_guard>::value, int>::type = 0 + > scope_guard(G&& f) : f(std::forward(f)), active(true) {} ~scope_guard() { if(active) {