fix formatting in defer.h

This commit is contained in:
silverweed 2025-01-28 11:16:50 +01:00
parent ff5792d6a4
commit 2b3d8d3a01

View file

@ -1,12 +1,13 @@
template <typename F>
struct Defer_Guard {
Defer_Guard(F && f) : _f(f) {}
Defer_Guard(F &&f) : _f(f) {}
~Defer_Guard() { _f(); }
F _f;
};
struct Defer_Guard_Helper {
template <typename F>
Defer_Guard<F> operator+(F&& f) { return Defer_Guard<F>(static_cast<F &&>(f)); }
Defer_Guard<F> operator+(F &&f) { return Defer_Guard<F>(static_cast<F &&>(f)); }
};
#define CONCAT_STR_INTERNAL(A, B) A##B