45#include <gtest/gtest.h>
119 throw std::runtime_error(
"test exception");
121 catch (
const std::runtime_error&)
137 throw std::runtime_error(
"test exception");
139 catch (
const std::runtime_error&)
254 guard = std::move(ref);
372 explicit Cleanup(
bool& f) : flag(f) {}
373 void operator()() { flag =
true; }
386 std::function<
void()> cleanup = [&called]() { called =
true; };
410 std::vector<int>
log;
RAII guard for exception-safe resource cleanup.
void free_function_cleanup(bool &flag)
RAII guard for graph algorithm initialization.
void release() noexcept
Release the guard - cleanup will not be called.
__gmp_expr< T, __gmp_unary_expr< __gmp_expr< T, U >, __gmp_log_function > > log(const __gmp_expr< T, U > &expr)
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Main namespace for Aleph-w library functions.
auto make_init_guard(CleanupFunc f)
Create an Init_Guard with a cleanup function.