A class that calls an exit function at the end of its scope.
More...
#include <gscope.h>
A class that calls an exit function at the end of its scope.
Eg:
{
int fd = open( ... ) ;
int nread = read( fd , ... ) ;
}
ScopeExit(std::function< void()> fn)
Constructor.
Definition at line 45 of file gscope.h.
◆ ScopeExit()
G::ScopeExit::ScopeExit |
( |
std::function< void()> |
fn | ) |
|
|
inlineexplicit |
Constructor.
Definition at line 99 of file gscope.h.
◆ ~ScopeExit()
G::ScopeExit::~ScopeExit |
( |
| ) |
|
|
inline |
◆ release()
void G::ScopeExit::release |
( |
| ) |
|
|
inlinenoexcept |
Deactivates the exit function.
Definition at line 105 of file gscope.h.
The documentation for this class was generated from the following file:
- /usr/src/slapt-src-i486/network/emailrelay/emailrelay-2.3/src/glib/gscope.h