From ad90cc09bcc55485a831a58762d242bbb3bffdb8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 20 Aug 2018 19:46:32 +0100 Subject: Fix compilation with template auto and + operator --- libadhocutil/compileTimeFormatter.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libadhocutil/compileTimeFormatter.h b/libadhocutil/compileTimeFormatter.h index b05e9f4..0551f62 100644 --- a/libadhocutil/compileTimeFormatter.h +++ b/libadhocutil/compileTimeFormatter.h @@ -34,7 +34,7 @@ namespace AdHoc { return off; } - template class Formatter; + template ())> class Formatter; template struct StreamWriter { @@ -105,9 +105,10 @@ namespace AdHoc { * Compile time string formatter. * @param S the format string. */ - template ()> + template ()) L = strlen()> class Formatter { private: + typedef decltype(strlen()) strlen_t; template friend struct StreamWriterBase; public: @@ -153,7 +154,7 @@ namespace AdHoc { } return s; } - template + template static inline void packAndWrite(stream & s, const Pn & ... pn) { if constexpr (ph + off == L || sizeof...(Pck) == 32) { -- cgit v1.2.3