Audacity  3.0.3
Public Member Functions | Public Attributes | List of all members
Final_action< 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

 Final_action (F f)
 
 ~Final_action ()
 

Public Attributes

clean
 

Detailed Description

template<typename F>
struct Final_action< 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 301 of file MemoryX.h.

Constructor & Destructor Documentation

◆ Final_action()

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

Definition at line 302 of file MemoryX.h.

302 : clean( f ) {}

◆ ~Final_action()

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

Definition at line 303 of file MemoryX.h.

303 { clean(); }

References Final_action< F >::clean.

Member Data Documentation

◆ clean

template<typename F >
F Final_action< F >::clean

Definition at line 304 of file MemoryX.h.

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


The documentation for this struct was generated from the following file:
Final_action::clean
F clean
Definition: MemoryX.h:304