#include <uhd/utils/scope_exit.hpp>
| Public Types | |
| using | uptr = std::unique_ptr<scope_exit> | 
| using | exit_cb_t = std::function<void(void)> | 
| Public Member Functions | |
| ~scope_exit () | |
| Static Public Member Functions | |
| static uptr | make (exit_cb_t &&exit_cb) | 
A class that will execute a function on its destruction
Similar to Boost.ScopeExit. A useful tool for RAII-style operations.
Note: The creation of the object can be costly if converting the exit callback to exit_cb_t incurs copying overhead. Keep this in mind when using this object in a high-performance path.
| using uhd::utils::scope_exit::exit_cb_t = std::function<void(void)> | 
| using uhd::utils::scope_exit::uptr = std::unique_ptr<scope_exit> | 
| 
 | inline |