revamped format module (more flexible, cleaner api)

master
Daniel Kolesa 2017-02-20 18:04:03 +01:00
parent 3a82495a4c
commit 5a76f29dea
4 changed files with 415 additions and 443 deletions

File diff suppressed because it is too large Load Diff

View File

@ -213,7 +213,7 @@ namespace detail {
template<typename T>
inline void write(T const &v) {
format(detail::stdout_range{}, format_spec{'s'}, v);
format_spec{'s'}.format_value(detail::stdout_range{}, v);
}
template<typename T, typename ...A>

View File

@ -204,7 +204,7 @@ namespace detail {
template<typename T>
inline void stream::write(T const &v) {
format(detail::fmt_stream_range{this}, format_spec{'s'}, v);
format_spec{'s'}.format_value(detail::fmt_stream_range{this}, v);
}
template<typename ...A>

View File

@ -702,7 +702,7 @@ public:
} else {
p_buf = sbuf;
}
char_range bufr{p_buf, p_buf + input.size()};
char_range bufr{p_buf, p_buf + input.size() + 1};
range_put_all(bufr, input);
bufr.put('\0');
}