Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
Finally< F > Struct Template Reference

"finally" as in The C++ Programming Language, 4th ed., p. 358 Useful for defining ad-hoc RAII actions. typical usage: auto cleanup = finally([&]{ ... code; ... }); More...

#include <MemoryX.h>

Public Member Functions

 Finally (F f)
 
 ~Finally ()
 

Public Attributes

clean
 

Detailed Description

template<typename F>
struct Finally< F >

"finally" as in The C++ Programming Language, 4th ed., p. 358 Useful for defining ad-hoc RAII actions. typical usage: auto cleanup = finally([&]{ ... code; ... });

Definition at line 175 of file MemoryX.h.

Constructor & Destructor Documentation

◆ Finally()

template<typename F >
Finally< F >::Finally ( f)
inline

Definition at line 176 of file MemoryX.h.

176: clean( f ) {}
F clean
Definition: MemoryX.h:178

◆ ~Finally()

template<typename F >
Finally< F >::~Finally ( )
inline

Definition at line 177 of file MemoryX.h.

177{ clean(); }

References Finally< F >::clean.

Member Data Documentation

◆ clean

template<typename F >
F Finally< F >::clean

Definition at line 178 of file MemoryX.h.

Referenced by Finally< F >::~Finally().


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