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(...);
68 typedef decltype(test<T>(0))
result;
75 template <
typename Char>
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_
vint4 max(const vint4 &a, const vint4 &b)
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
std::ostream & operator<<(std::ostream &ostr, const DataType &a)
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)
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)
GLuint GLuint GLsizei GLenum type
FMT_CONSTEXPR std::make_unsigned< Int >::type to_unsigned(Int value)
GLuint GLuint GLsizei count
void format_value(basic_buffer< Char > &buffer, const T &value)
#define FMT_BEGIN_NAMESPACE
basic_string_view< Char > to_string_view(basic_string_view< Char > s)
GLenum GLuint GLsizei const GLchar * buf
GLsizei const GLfloat * 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)