summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-10-27 10:24:08 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-10-27 10:24:08 +0300
commitda46c37bc7cf784c781d3c89d81b33911c10fedd (patch)
treeac602760e351e848a80d64ba569d9c26e4ab0bde /include
parentc437497e149c8e381c9d1219e2a98af0d0af700e (diff)
parentd4a89b92629328f7e18b7e0595f88f24c811c096 (diff)
downloadmariadb-git-da46c37bc7cf784c781d3c89d81b33911c10fedd.tar.gz
Merge 10.6 into 10.7
Diffstat (limited to 'include')
-rw-r--r--include/scope.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scope.h b/include/scope.h
index b9e2e96ae5c..e0e9fc62969 100644
--- a/include/scope.h
+++ b/include/scope.h
@@ -64,3 +64,11 @@ make_scope_exit(Callable &&f)
return detail::scope_exit<typename std::decay<Callable>::type>(
std::forward<Callable>(f));
}
+
+#define CONCAT_IMPL(x, y) x##y
+
+#define CONCAT(x, y) CONCAT_IMPL(x, y)
+
+#define ANONYMOUS_VARIABLE CONCAT(_anonymous_variable, __LINE__)
+
+#define SCOPE_EXIT auto ANONYMOUS_VARIABLE= make_scope_exit