mirror of
https://github.com/google/nsjail.git
synced 2026-08-30 18:41:30 -07:00
Fix -Wctad-maybe-unsupported warning by adding an explicit deduction guide for Defer
This commit is contained in:
4
macros.h
4
macros.h
@@ -58,6 +58,10 @@ struct Defer {
|
|||||||
Defer& operator=(Defer&&) = default;
|
Defer& operator=(Defer&&) = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* -Wctad-maybe-unsupported */
|
||||||
|
template <typename F>
|
||||||
|
Defer(F) -> Defer<F>;
|
||||||
|
|
||||||
#define _DEFER_1(x, y) x##y
|
#define _DEFER_1(x, y) x##y
|
||||||
#define _DEFER_2(x, y) _DEFER_1(x, y)
|
#define _DEFER_2(x, y) _DEFER_1(x, y)
|
||||||
#define _DEFER_3(x) _DEFER_2(x, __COUNTER__)
|
#define _DEFER_3(x) _DEFER_2(x, __COUNTER__)
|
||||||
|
|||||||
Reference in New Issue
Block a user