CallOnDestruction(std::function<void()> c, bool enable = true)No comment in the header yet.
API · fair::mq::tools
Executes the given callback in the destructor. Can be used to execute something in case of an exception when catch is undesirable, e.g.:
{ // callback will be executed only if f throws an exception CallOnDestruction cod([](){ cout << "exception was thrown"; }, true); f(); cod.disable(); }
CallOnDestruction(std::function<void()> c, bool enable = true)No comment in the header yet.
~CallOnDestruction()No comment in the header yet.
void enable()No comment in the header yet.
void disable()No comment in the header yet.