template<typename Fn>
struct juce::ScopeGuard< Fn >
An easy way to ensure that a function is called at the end of the current scope.
Usage:
{
if (flag == true)
return;
flag = true;
if (checkInitialCondition())
return;
if (checkCriticalCondition())
throw std::runtime_error{};
doWorkHavingEstablishedPreconditions();
}
An easy way to ensure that a function is called at the end of the current scope.
Definition juce_ScopeGuard.h:64
Inherits Fn.