wwa-scope-action 1.0.0
Scope guard utilities for managing exit actions in C++
wwa::utils Namespace Reference

Library namespace. More...

Classes

class  exit_action
 A scope guard that calls its exit function on destruction, when a scope is exited. More...
 
class  fail_action
 A scope guard that calls its exit function when a scope is exited via an exception. More...
 
class  success_action
 A scope guard that calls its exit function when a scope is exited normally. More...
 

Functions

template<typename ExitFunc >
 exit_action (ExitFunc) -> exit_action< ExitFunc >
 Deduction guide for exit_action.
 
template<typename ExitFunc >
 fail_action (ExitFunc) -> fail_action< ExitFunc >
 Deduction guide for fail_action.
 
template<typename ExitFunc >
 success_action (ExitFunc) -> success_action< ExitFunc >
 Deduction guide for success_action.
 

Detailed Description

Library namespace.

Function Documentation

◆ exit_action()

template<typename ExitFunc >
wwa::utils::exit_action ( ExitFunc ) -> exit_action< ExitFunc >

Deduction guide for exit_action.

Template Parameters
ExitFuncExit function type.

◆ fail_action()

template<typename ExitFunc >
wwa::utils::fail_action ( ExitFunc ) -> fail_action< ExitFunc >

Deduction guide for fail_action.

Template Parameters
ExitFuncExit function type.

◆ success_action()

template<typename ExitFunc >
wwa::utils::success_action ( ExitFunc ) -> success_action< ExitFunc >

Deduction guide for success_action.

Template Parameters
ExitFuncExit function type.