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);
84 value =
sizeof(
convert(get<DummyStream>() << get<T>())) ==
sizeof(
No)
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
void resize(std::size_t new_size)
void reserve(std::size_t capacity)
std::size_t capacity() const
static constexpr bool value
MakeUnsigned< Int >::Type to_unsigned(Int value)
No & operator<<(std::ostream &, int)
Yes & convert(fmt::ULongLong)
FMT_FUNC int fprintf(std::ostream &os, CStringRef format, ArgList args)
std::string format(CStringRef format_str, ArgList args)
FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args)
BasicCStringRef< char > CStringRef