summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libadhocutil/compileTimeFormatter.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/libadhocutil/compileTimeFormatter.h b/libadhocutil/compileTimeFormatter.h
index 4fcb1cb..1e2a99c 100644
--- a/libadhocutil/compileTimeFormatter.h
+++ b/libadhocutil/compileTimeFormatter.h
@@ -38,6 +38,11 @@ namespace AdHoc {
template<const auto & S, auto L, auto pos, typename stream, auto ...>
struct StreamWriter {
+ template<typename ... Pn>
+ static void write(stream &, const Pn & ...)
+ {
+ static_assert(!L, "invalid format string/arguments");
+ }
};
template<const auto & S, auto L, auto pos, typename stream>
@@ -79,16 +84,6 @@ namespace AdHoc {
}
};
- // Unknown stream writer formatter
- template<const auto & S, auto L, auto pos, typename stream, auto ... sn>
- struct StreamWriter<S, L, pos, stream, '%', sn...> {
- template<typename ... Pn>
- static void write(stream & s, const Pn & ...)
- {
- static_assert(!&s, "invalid format string/arguments");
- }
- };
-
template<typename stream, typename char_type>
static inline void appendStream(stream & s, const char_type * p, size_t n)
{