summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-05-08 22:57:17 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2018-05-08 22:57:17 +0100
commit856a7411b683aca2579f69d6a3b7c0f0d735948f (patch)
tree224ec9177eaacdd4028e4309b2132896e6ed8fd1
parentC++17 (diff)
downloadlibadhocutil-856a7411b683aca2579f69d6a3b7c0f0d735948f.tar.bz2
libadhocutil-856a7411b683aca2579f69d6a3b7c0f0d735948f.tar.xz
libadhocutil-856a7411b683aca2579f69d6a3b7c0f0d735948f.zip
Fix uniqueness of generated name for format string var
-rw-r--r--libadhocutil/compileTimeFormatter.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libadhocutil/compileTimeFormatter.h b/libadhocutil/compileTimeFormatter.h
index 53116d0..f4fdf77 100644
--- a/libadhocutil/compileTimeFormatter.h
+++ b/libadhocutil/compileTimeFormatter.h
@@ -1,6 +1,7 @@
#include <sstream>
#include <string.h>
#include <boost/preprocessor/variadic/size.hpp>
+#include "unique.h"
namespace AdHoc {
/// @cond
@@ -226,5 +227,5 @@ namespace AdHoc {
extern constexpr auto id = str; \
typedef ::AdHoc::Formatter<id> name
#define AdHocFormatter(name, str) \
- AdHocFormatterTypedef(name, str, name ## __COUNTER__)
+ AdHocFormatterTypedef(name, str, MAKE_UNIQUE(name))