33#ifndef AH_INIT_GUARD_H
34#define AH_INIT_GUARD_H
78template <
typename CleanupFunc>
129 other.released =
true;
148 other.released =
true;
155template <
typename CleanupFunc>
168template <
typename CleanupFunc>
RAII guard for graph algorithm initialization.
void release() noexcept
Release the guard - cleanup will not be called.
bool is_released() const noexcept
Check if the guard has been released.
Init_Guard(Init_Guard &&other) noexcept
Move constructor.
Init_Guard(CleanupFunc f)
Construct guard with cleanup function.
Init_Guard(const Init_Guard &)=delete
Non-copyable.
Init_Guard & operator=(Init_Guard &&other) noexcept
Move assignment operator.
Init_Guard & operator=(const Init_Guard &)=delete
~Init_Guard()
Destructor calls cleanup if not released.
Main namespace for Aleph-w library functions.
auto make_init_guard(CleanupFunc f)
Create an Init_Guard with a cleanup function.
DynList< T > maps(const C &c, Op op)
Classic map operation.