diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-05-08 22:57:17 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-05-08 22:57:17 +0100 |
commit | 856a7411b683aca2579f69d6a3b7c0f0d735948f (patch) | |
tree | 224ec9177eaacdd4028e4309b2132896e6ed8fd1 | |
parent | C++17 (diff) | |
download | libadhocutil-856a7411b683aca2579f69d6a3b7c0f0d735948f.tar.bz2 libadhocutil-856a7411b683aca2579f69d6a3b7c0f0d735948f.tar.xz libadhocutil-856a7411b683aca2579f69d6a3b7c0f0d735948f.zip |
Fix uniqueness of generated name for format string var
-rw-r--r-- | libadhocutil/compileTimeFormatter.h | 3 |
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)) |