| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
uhd::utils::scope_exit Class Reference

`#include <uhd/utils/scope_exit.hpp>`

## Detailed Description

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.

## 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)

## Member Typedef Documentation

## ◆ exit_cb_t

using uhd::utils::scope_exit::exit_cb_t = std::function<void(void)>

## ◆ uptr

using uhd::utils::scope_exit::uptr = std::unique_ptr<scope_exit>

## Constructor & Destructor Documentation

## ◆ ~scope_exit()

uhd::utils::scope_exit::~scope_exit | ( |  | ) |
| inline

## Member Function Documentation

## ◆ make()

uptr uhd::utils::scope_exit::make | ( | exit_cb_t && | exit_cb | ) |
| inline static

The documentation for this class was generated from the following file:

- scope_exit.hpp