Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ah_init_guard.H File Reference

RAII guard for exception-safe resource cleanup. More...

#include <utility>
Include dependency graph for ah_init_guard.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Aleph::Init_Guard< CleanupFunc >
 RAII guard for graph algorithm initialization. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Functions

template<typename CleanupFunc >
 Aleph::Init_Guard (CleanupFunc) -> Init_Guard< CleanupFunc >
 Deduction guide for Init_Guard.
 
template<typename CleanupFunc >
auto Aleph::make_init_guard (CleanupFunc f)
 Create an Init_Guard with a cleanup function.
 

Detailed Description

RAII guard for exception-safe resource cleanup.

Provides a scope guard that executes a cleanup function when destroyed, unless explicitly released. Commonly used in graph algorithms to ensure proper cleanup of node/arc cookies even if exceptions are thrown.

Author
Leandro Rabindranath León

Definition in file ah_init_guard.H.