28 #ifndef FMT_OSTREAM_H_
29 #define FMT_OSTREAM_H_
39 class FormatBuf :
public std::basic_streambuf<Char> {
42 typedef typename std::basic_streambuf<Char>::traits_type
traits_type;
53 if (!traits_type::eq_int_type(ch, traits_type::eof())) {
54 size_t buf_size =
size();
59 start_[buf_size] = traits_type::to_char_type(ch);
90 template <
typename Char,
typename ArgFormatter,
typename T>
92 const Char *&format_str,
const T &
value) {
96 std::basic_ostream<Char> output(&format_buf);
101 format_str = f.
format(format_str, MakeArg(str));
129 #ifdef FMT_HEADER_ONLY
133 #endif // FMT_OSTREAM_H_