mrdocs::ScopeExit

Execute a callable when the enclosing scope exits unless dismissed.

Synopsis

Declared in <mrdocs/Support/ScopeExit.hpp>

template<class F>
class ScopeExit;

Member Functions

NameDescription
ScopeExit [constructor]Construct with a callable to invoke on scope exit.
~ScopeExit [destructor]Invoke the stored callable if the guard was not dismissed.
dismiss Prevent the callable from running on destruction.

Deduction Guides

NameDescription
ScopeExit<F> Deduction guide for ScopeExit.