The ScopeOutAction class - guard-type class that allows points callback that will be called at the scope out.
More...
#include <avutils.h>
The ScopeOutAction class - guard-type class that allows points callback that will be called at the scope out.
Example:
void foo()
{
int fd = open(...some args...);
close(fd);
});
try
{
}
catch(...)
{
throw;
}
}
In example above dtor of the action will be called before fd and we correctly close descriptor.
◆ ScopeOutAction() [1/2]
template<typename Proc >
av::ScopeOutAction::ScopeOutAction |
( |
const Proc & |
proc | ) |
|
|
inline |
◆ ScopeOutAction() [2/2]
template<typename Proc >
av::ScopeOutAction::ScopeOutAction |
( |
Proc && |
proc | ) |
|
|
inline |
◆ ~ScopeOutAction()
av::ScopeOutAction::~ScopeOutAction |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: