From 856a7411b683aca2579f69d6a3b7c0f0d735948f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 8 May 2018 22:57:17 +0100 Subject: Fix uniqueness of generated name for format string var --- libadhocutil/compileTimeFormatter.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 #include #include +#include "unique.h" namespace AdHoc { /// @cond @@ -226,5 +227,5 @@ namespace AdHoc { extern constexpr auto id = str; \ typedef ::AdHoc::Formatter name #define AdHocFormatter(name, str) \ - AdHocFormatterTypedef(name, str, name ## __COUNTER__) + AdHocFormatterTypedef(name, str, MAKE_UNIQUE(name)) -- cgit v1.2.3