Audacity 3.2.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SimpleGuard< bool > Struct Reference

Specialization of SimpleGuard, also defining a default value. More...

#include <AudacityException.h>

Public Member Functions

 SimpleGuard (bool value) noexcept
 
bool operator() (AudacityException *) const noexcept
 

Static Public Member Functions

static SimpleGuard Default () noexcept
 

Public Attributes

const bool m_value
 

Detailed Description

Specialization of SimpleGuard, also defining a default value.

Definition at line 145 of file AudacityException.h.

Constructor & Destructor Documentation

◆ SimpleGuard()

SimpleGuard< bool >::SimpleGuard ( bool  value)
inlineexplicitnoexcept
Parameters
valueThe value to return from GaurdedCall when an exception is handled

Definition at line 147 of file AudacityException.h.

150 : m_value{ value } {}

Member Function Documentation

◆ Default()

static SimpleGuard SimpleGuard< bool >::Default ( )
inlinestaticnoexcept

Definition at line 152 of file AudacityException.h.

153 { return SimpleGuard{ false }; }
A default template parameter for GuardedCall<R>

◆ operator()()

bool SimpleGuard< bool >::operator() ( AudacityException ) const
inlinenoexcept

Definition at line 151 of file AudacityException.h.

151{ return m_value; }

References SimpleGuard< R >::m_value.

Member Data Documentation

◆ m_value

const bool SimpleGuard< bool >::m_value

Definition at line 154 of file AudacityException.h.


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