Finalizer class to help with exception safety sets variable to value on destruction. More...
#include <utility.hpp>
Public Member Functions | |
variable_finalizer (T &variable, T value) | |
~variable_finalizer () | |
void | clear () |
Stop tracking the variable, i.e. More... | |
Private Attributes | |
T * | variable_ |
T | value_ |
Finalizer class to help with exception safety sets variable to value on destruction.
Definition at line 89 of file utility.hpp.
|
inline |
Definition at line 92 of file utility.hpp.
|
inline |
Definition at line 96 of file utility.hpp.
References wb::variable_finalizer< T >::value_, and wb::variable_finalizer< T >::variable_.
|
inline |
Stop tracking the variable, i.e.
this object won't do anything on destruction.
Definition at line 103 of file utility.hpp.
References wb::variable_finalizer< T >::variable_.
|
private |
Definition at line 109 of file utility.hpp.
Referenced by wb::variable_finalizer< T >::~variable_finalizer().
|
private |
Definition at line 108 of file utility.hpp.
Referenced by wb::variable_finalizer< T >::clear(), and wb::variable_finalizer< T >::~variable_finalizer().