Scope final guard that invokes a function upon leaving the scope.
Synopsis
Declared in header <boost/scope/scope_final.hpp>
template<typename Func>
class scope_final;
Member Functions
Name |
Description |
Invokes the wrapped callable function object and destroys the callable. |
Description
The scope guard wraps a function object callable with no arguments that can be one of:
-
A user-defined class with a public
operator()
. -
An lvalue reference to such class.
-
An lvalue reference or pointer to function taking no arguments. The scope final guard unconditionally invokes the wrapped function object on destruction.