Honeycomb  0.1
Component-Model Framework
Public Member Functions | Related Functions | List of all members
honey::ScopeGuard_< F > Class Template Reference

Run a function at scope exit. See ScopeGuard() to create. More...

#include <ScopeGuard.h>

Inheritance diagram for honey::ScopeGuard_< F >:
Inheritance graph
[legend]
Collaboration diagram for honey::ScopeGuard_< F >:
Collaboration graph
[legend]

Public Member Functions

 ScopeGuard_ (F &&func)
 
 ScopeGuard_ (ScopeGuard_ &&rhs) noexcept
 
 ~ScopeGuard_ ()
 
void release ()
 Disengage the guard so the function isn't run at scope exit. More...
 

Related Functions

(Note that these are not member functions.)

template<class F >
ScopeGuard_< F > ScopeGuard (F &&func)
 Create a scope guard of deduced type. Call with lambda: auto guard = ScopeGuard([] {...}); More...
 

Detailed Description

template<class F>
class honey::ScopeGuard_< F >

Run a function at scope exit. See ScopeGuard() to create.

Constructor & Destructor Documentation

template<class F >
honey::ScopeGuard_< F >::ScopeGuard_ ( F &&  func)
inline
template<class F >
honey::ScopeGuard_< F >::ScopeGuard_ ( ScopeGuard_< F > &&  rhs)
inlinenoexcept
template<class F >
honey::ScopeGuard_< F >::~ScopeGuard_ ( )
inline

Member Function Documentation

template<class F >
void honey::ScopeGuard_< F >::release ( )
inline

Disengage the guard so the function isn't run at scope exit.

Friends And Related Function Documentation

template<class F >
ScopeGuard_< F > ScopeGuard ( F &&  func)
related

Create a scope guard of deduced type. Call with lambda: auto guard = ScopeGuard([] {...});


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