#include "ScopeGuard.hpp" CScopeGuard::CScopeGuard(const std::function& fn_) : fn(fn_) { ; } CScopeGuard::~CScopeGuard() { if (fn) fn(); }