|
Leonardus
|
Helper class to call a check always at function return. More...
#include <dbc.h>
Collaboration diagram for DbCRAIIassert< T >:Public Member Functions | |
| DbCRAIIassert (assert_t p_fun, T *p_obj) | |
| Ctor. | |
| ~DbCRAIIassert () | |
| Dtor. | |
Private Types | |
| using | assert_t = bool(T::*)() const noexcept |
| A shortcut for the invariant() function pointers. | |
Private Attributes | |
| const assert_t | fun_ |
| The invariant() of the current class to be called at function return. | |
| const T * | obj_ |
| The this of the invariant function. | |
Helper class to call a check always at function return.
|
inline |
Dtor.
Calls the stored invariant() function with the assert macro.