|
Scope
|
An exit handler for handling non-throwing cases. More...
#include <scope.hpp>
Inheritance diagram for scope::scope_success< Fn >:
Collaboration diagram for scope::scope_success< Fn >:An exit handler for handling non-throwing cases.
This will execute as long as an exception has not been thrown in the same frame the scope was created in. You can manually disengage executing this handler by calling release.
When working in C++17 and above, you can use the automatic class type-deduction in order to create an instance of this:
When working in any C++11 or C++14, convenience functions are also added to perform this deduction for you:
| Fn | the function type for the scope to execute |