diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-06-13 01:42:31 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-06-13 01:42:31 +0100 |
commit | 76b012a5e13d10d3184ca9b5a8e1890c57e3344e (patch) | |
tree | 7b840f77845a333ef27d6c48148f816d8dc846ed /lib | |
parent | Create and drop MySQL mock DBs as needed (diff) | |
download | mygrate-76b012a5e13d10d3184ca9b5a8e1890c57e3344e.tar.bz2 mygrate-76b012a5e13d10d3184ca9b5a8e1890c57e3344e.tar.xz mygrate-76b012a5e13d10d3184ca9b5a8e1890c57e3344e.zip |
Add a concept to differentiate streams better
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compileTimeFormatter.h | 7 |
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) { |