idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
Finally.h
1//
2// Created by henri on 14.12.23.
3//
4
5#ifndef IDOL_FINALLY_H
6#define IDOL_FINALLY_H
7
8#include <functional>
9
10namespace idol {
11 class Finally;
12}
13
15 std::function<void()> m_function;
16public:
17 explicit Finally(std::function<void()> t_function) : m_function(std::move(t_function)) {}
18
19 ~Finally() { m_function(); }
20};
21
22
23#endif //IDOL_FINALLY_H