actually use write_bytes directly

master
Daniel Kolesa 2017-02-10 17:48:19 +01:00
parent 922f19b776
commit d06637eac6
1 changed files with 2 additions and 2 deletions

View File

@ -190,10 +190,10 @@ namespace detail {
struct FmtStreamRange: OutputRange<FmtStreamRange, char> {
FmtStreamRange(Stream &s): p_s(s) {}
bool put(char c) {
return p_s.putchar(c);
return p_s.write_bytes(&c, 1) == 1;
}
size_t put_n(char const *p, size_t n) {
return p_s.put(p, n);
return p_s.write_bytes(p, n);
}
Stream &p_s;
};