toast::scope_guard Class Reference
[toast miscellaneous utilities]

#include <toast/scope_guard.hpp>

List of all members.


Detailed Description

calls a function on destruction unless dismissed

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 ()


The documentation for this class was generated from the following file:

SourceForge.net Logo