18 class formatbuf :
public std::basic_streambuf<Char> {
21 typedef typename std::basic_streambuf<Char>::traits_type
traits_type;
37 if (!traits_type::eq_int_type(ch, traits_type::eof()))
48 template <
typename Char>
57 template <
typename T,
typename Char>
63 << internal::declval<U>(), std::true_type())
test(
int);
66 static
std::false_type
test(...);
75 template <typename Char>
77 const Char *
data = buf.data();
79 UnsignedStreamSize
size = buf.size();
80 UnsignedStreamSize max_size =
83 UnsignedStreamSize
n = size <= max_size ? size : max_size;
84 os.write(data, static_cast<std::streamsize>(n));
90 template <
typename Char,
typename T>
93 std::basic_ostream<Char> output(&format_buf);
94 output.exceptions(std::ios_base::failbit | std::ios_base::badbit);
102 template <
typename T,
typename Char>
110 template <
typename T,
typename Char>
112 typename
std::enable_if<
113 internal::is_streamable<T, Char>::value &&
114 !internal::format_type<
115 typename buffer_context<Char>::type, T>::value>
::type>
116 :
formatter<basic_string_view<Char>, Char> {
118 template <
typename Context>
127 template <
typename Char>
128 inline void vprint(std::basic_ostream<Char> &os,
144 template <
typename S,
typename... Args>
147 const Args & ...
args) {
153 #endif // FMT_OSTREAM_H_
void append(const U *begin, const U *end)
std::add_rvalue_reference< T >::type declval() FMT_NOEXCEPT
void resize(std::size_t new_size)
void write(std::basic_ostream< Char > &os, basic_buffer< Char > &buf)
#define FMT_END_NAMESPACE
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
buffer_context< Char >::type::iterator vformat_to(internal::basic_buffer< Char > &buf, basic_string_view< Char > format_str, basic_format_args< typename buffer_context< Char >::type > args)
dummy_string_view to_string_view(...)
void vprint(std::basic_ostream< Char > &os, basic_string_view< Char > format_str, basic_format_args< typename buffer_context< Char >::type > args)
std::size_t size() const FMT_NOEXCEPT
void push_back(const T &value)
std::string str(const std::pair< Type, Type > &tt)
std::ostream & operator<<(std::ostream &os, Analyzer::Table< T > const &t)
static int max(int a, int b)
basic_buffer< char > buffer
FMT_CONSTEXPR std::make_unsigned< Int >::type to_unsigned(Int value)
const GenericPointer< typename T::ValueType > T2 value
void format_value(basic_buffer< Char > &buffer, const T &value)
std::enable_if< internal::is_string< S >::value >::type print(std::basic_ostream< FMT_CHAR(S)> &os, const S &format_str, const Args &...args)