1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
13 * An action to be executed at end of scope.
21 Defer(std::function<void()> func) : m_Func(std::move(func))
25 Defer(const Defer&) = delete;
26 Defer(Defer&&) = delete;
27 Defer& operator=(const Defer&) = delete;
28 Defer& operator=(Defer&&) = delete;
36 // https://stackoverflow.com/questions/130117/throwing-exceptions-out-of-a-destructor
41 std::function<void()> m_Func;