From 1ae4dcd724d5267f754f3bd65bdcdcf26288ea39 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 30 Aug 2018 21:12:38 +0100 Subject: Add in a template type arg for enable_if --- libadhocutil/compileTimeFormatter.h | 8 ++++---- libadhocutil/detail/compileTimeFormatters.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libadhocutil/compileTimeFormatter.h b/libadhocutil/compileTimeFormatter.h index 1e2a99c..8d60800 100644 --- a/libadhocutil/compileTimeFormatter.h +++ b/libadhocutil/compileTimeFormatter.h @@ -36,7 +36,7 @@ namespace AdHoc { template ())> class Formatter; - template + template struct StreamWriter { template static void write(stream &, const Pn & ...) @@ -56,12 +56,12 @@ namespace AdHoc { #define StreamWriterT(C...) \ template \ - struct StreamWriter : \ + struct StreamWriter : \ public StreamWriterBase #define StreamWriterTP(P, C...) \ template \ - struct StreamWriter : \ + struct StreamWriter : \ public StreamWriterBase // Default stream writer formatter @@ -153,7 +153,7 @@ namespace AdHoc { static inline void packAndWrite(stream & s, const Pn & ... pn) { if constexpr (ph + off == L || sizeof...(Pck) == 32) { - StreamWriter::write(s, pn...); + StreamWriter::write(s, pn...); } else if constexpr (ph + off < L) { packAndWrite(s, pn...); diff --git a/libadhocutil/detail/compileTimeFormatters.h b/libadhocutil/detail/compileTimeFormatters.h index 3b12ea9..8579f92 100644 --- a/libadhocutil/detail/compileTimeFormatters.h +++ b/libadhocutil/detail/compileTimeFormatters.h @@ -97,7 +97,7 @@ namespace AdHoc { static inline void write(stream & s, int l, const Pn & ... pn) { s << std::setw(l) << std::setprecision(l); - StreamWriter::write(s, pn...); + StreamWriter::write(s, pn...); } }; StreamWriterT('.', '*', 's') { @@ -114,7 +114,7 @@ namespace AdHoc { StreamWriterT(__VA_ARGS__) { \ template static inline void write(stream & s, const Pn & ... pn) { \ OP; \ - StreamWriter::write(s, pn...); \ + StreamWriter::write(s, pn...); \ } \ }; FLAGCONV(s << std::showbase, '#'); -- cgit v1.2.3