#include <toast/scope_guard.hpp>
A great helper for writing exception safe code. Can often eliminate the need for a try/catch block. But be careful not to have it call any functions that may themselves throw, your program will be aborted.
Public Member Functions | |
scope_guard (boost::function< void()> const &f) | |
void | dismiss () |