RWScopeGuard
RWScopeGuard encapsulates a function to invoke and a set of parameters to pass to that function. It can handle functions that take up to five parameters of any type. The function wrapped by a scope guard is invoked when the guard goes out of scope. As with other automatic objects, scope guards are destroyed in the reverse order of construction.