|
You can execute code when the enclosing scope is left by using the macro ARMARX_ON_SCOPE_EXIT. Later macro instantiations are executed first (order of c++ stack unwinding).
This code prints "bazfoobar" on std::cout. ("foobar" is printed when the scope is left).