lbug 0.16.1

An in-process property graph database management system built for query speed and scalability
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once

#include <concepts>

namespace lbug::common {
// RAII wrapper that calls an enclosed function when this class goes out of scope
// Should be used for any cleanup code that must be executed even if exceptions occur
template<std::invocable Func>
struct FinallyWrapper {
    explicit FinallyWrapper(Func&& func) : func(func) {}
    ~FinallyWrapper() { func(); }
    Func func;
};
} // namespace lbug::common