Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
ScopeGuard< Function > Class Template Reference

#include <ScopeGuard.h>

Public Member Functions

 ScopeGuard (Function &&function)
 
void dismiss ()
 
 ~ScopeGuard () noexcept
 
 ScopeGuard (Function &&function)
 
void dismiss ()
 
 ~ScopeGuard () noexcept
 
 ScopeGuard (Function &&function)
 
void dismiss ()
 
 ~ScopeGuard () noexcept
 

Detailed Description

template<typename Function>
class pzstd::ScopeGuard< Function >

Dismissable scope guard. Function must be callable and take no parameters. Unless dissmiss() is called, the callable is executed upon destruction of ScopeGuard.

Example:

auto guard = makeScopeGuard([&] { cleanup(); });

Dismissable scope guard. Function must be callable and take no parameters. Unless dismiss() is called, the callable is executed upon destruction of ScopeGuard.

Example:

auto guard = makeScopeGuard([&] { cleanup(); });

Constructor & Destructor Documentation

◆ ScopeGuard() [1/3]

template<typename Function >
ScopeGuard ( Function && function)
inlineexplicit

◆ ~ScopeGuard() [1/3]

template<typename Function >
~ScopeGuard ( )
inlinenoexcept

◆ ScopeGuard() [2/3]

template<typename Function >
ScopeGuard ( Function && function)
inlineexplicit

◆ ~ScopeGuard() [2/3]

template<typename Function >
~ScopeGuard ( )
inlinenoexcept

◆ ScopeGuard() [3/3]

template<typename Function >
ScopeGuard ( Function && function)
inlineexplicit

◆ ~ScopeGuard() [3/3]

template<typename Function >
~ScopeGuard ( )
inlinenoexcept

Member Function Documentation

◆ dismiss() [1/3]

template<typename Function >
void dismiss ( )
inline

◆ dismiss() [2/3]

template<typename Function >
void dismiss ( )
inline

◆ dismiss() [3/3]

template<typename Function >
void dismiss ( )
inline

The documentation for this class was generated from the following files: