forked from OctaForge/libostd
revamped format module (more flexible, cleaner api)
This commit is contained in:
parent
3a82495a4c
commit
5a76f29dea
852
ostd/format.hh
852
ostd/format.hh
File diff suppressed because it is too large
Load diff
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue