diff options
Diffstat (limited to 'src/common/scope_exit.h')
-rw-r--r-- | src/common/scope_exit.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h index 263beaf0e..08f09a8c8 100644 --- a/src/common/scope_exit.h +++ b/src/common/scope_exit.h @@ -4,6 +4,9 @@ #pragma once +#include "common/common_funcs.h" +#include <utility> + namespace detail { template <typename Func> struct ScopeExitHelper { @@ -34,4 +37,4 @@ namespace detail { * } * \endcode */ -#define SCOPE_EXIT(body) auto scope_exit_helper_##__LINE__ = detail::ScopeExit([&]() body) +#define SCOPE_EXIT(body) auto CONCAT2(scope_exit_helper_, __LINE__) = detail::ScopeExit([&]() body) |