diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-01-11 13:32:31 -0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-01-30 11:47:03 -0200 |
commit | fc11aff9559da4725037c21f7a4732f5f009d975 (patch) | |
tree | f1034c4fd029f4e4867fe2b5b15352f87dbbd9b7 /src/common/scope_exit.h | |
parent | afc416c6079f2db2c6cfae704de4c312907b3bb7 (diff) |
Common: Fix SCOPE_EXIT to actually create unique identifiers.
Diffstat (limited to 'src/common/scope_exit.h')
-rw-r--r-- | src/common/scope_exit.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h index 263beaf0ef..77dcbaa223 100644 --- a/src/common/scope_exit.h +++ b/src/common/scope_exit.h @@ -4,6 +4,8 @@ #pragma once +#include "common/common_funcs.h" + namespace detail { template <typename Func> struct ScopeExitHelper { @@ -34,4 +36,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) |