summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-06-13 01:42:31 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-06-13 01:42:31 +0100
commit76b012a5e13d10d3184ca9b5a8e1890c57e3344e (patch)
tree7b840f77845a333ef27d6c48148f816d8dc846ed
parentCreate and drop MySQL mock DBs as needed (diff)
downloadmygrate-76b012a5e13d10d3184ca9b5a8e1890c57e3344e.tar.bz2
mygrate-76b012a5e13d10d3184ca9b5a8e1890c57e3344e.tar.xz
mygrate-76b012a5e13d10d3184ca9b5a8e1890c57e3344e.zip
Add a concept to differentiate streams better
-rw-r--r--lib/compileTimeFormatter.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/compileTimeFormatter.h b/lib/compileTimeFormatter.h
index 09aae53..3779454 100644
--- a/lib/compileTimeFormatter.h
+++ b/lib/compileTimeFormatter.h
@@ -251,7 +251,12 @@ namespace MyGrate {
return FormatterDetail<Str, Str.size()>::get(pn...);
}
- template<const Support::basic_fixed_string Str, typename stream, typename... Pn>
+ template<typename T>
+ concept Writable = requires(T s)
+ {
+ {s << 0};
+ };
+ template<const Support::basic_fixed_string Str, Writable stream, typename... Pn>
inline auto &
scprintf(stream & strm, const Pn &... pn)
{