template<typename F>
slang::ScopeGuard class

A simple guard class that ensures a given function is invoked when the guard object is destroyed.