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 172 of file MemoryX.h.

Constructor & Destructor Documentation

◆ Finally()

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

Definition at line 173 of file MemoryX.h.

173: clean( f ) {}
F clean
Definition: MemoryX.h:175

◆ ~Finally()

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

Definition at line 174 of file MemoryX.h.

174{ clean(); }

References Finally< F >::clean.

Member Data Documentation

◆ clean

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

Definition at line 175 of file MemoryX.h.

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


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