fix formatting in defer.h
This commit is contained in:
parent
ff5792d6a4
commit
2b3d8d3a01
1 changed files with 3 additions and 2 deletions
|
@ -1,12 +1,13 @@
|
||||||
template <typename F>
|
template <typename F>
|
||||||
struct Defer_Guard {
|
struct Defer_Guard {
|
||||||
Defer_Guard(F && f) : _f(f) {}
|
Defer_Guard(F &&f) : _f(f) {}
|
||||||
~Defer_Guard() { _f(); }
|
~Defer_Guard() { _f(); }
|
||||||
F _f;
|
F _f;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Defer_Guard_Helper {
|
struct Defer_Guard_Helper {
|
||||||
template <typename F>
|
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
|
#define CONCAT_STR_INTERNAL(A, B) A##B
|
||||||
|
|
Loading…
Add table
Reference in a new issue