30#ifndef _OSTREAM_INSERT_H
31#define _OSTREAM_INSERT_H 1
34#pragma GCC system_header
41#pragma GCC diagnostic push
42#pragma GCC diagnostic ignored "-Wc++11-extensions"
44namespace std _GLIBCXX_VISIBILITY(default)
46_GLIBCXX_BEGIN_NAMESPACE_VERSION
50 template<
typename _CharT,
typename _Traits>
56 typedef typename __ostream_type::ios_base __ios_base;
58 const streamsize __put = __out.rdbuf()->sputn(__s, __n);
60 __out.setstate(__ios_base::badbit);
63 template<
typename _CharT,
typename _Traits>
68 typedef typename __ostream_type::ios_base __ios_base;
70 const _CharT __c = __out.
fill();
71 for (; __n > 0; --__n)
73 const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c);
74 if (_Traits::eq_int_type(__put, _Traits::eof()))
76 __out.setstate(__ios_base::badbit);
82 template<
typename _CharT,
typename _Traits>
88 typedef typename __ostream_type::ios_base __ios_base;
90 typename __ostream_type::sentry __cerb(__out);
98 const bool __left = ((__out.flags()
99 & __ios_base::adjustfield)
100 == __ios_base::left);
102 __ostream_fill(__out, __w - __n);
104 __ostream_write(__out, __s, __n);
105 if (__left && __out.good())
106 __ostream_fill(__out, __w - __n);
109 __ostream_write(__out, __s, __n);
112 __catch(__cxxabiv1::__forced_unwind&)
114 __out._M_setstate(__ios_base::badbit);
115 __throw_exception_again;
118 { __out._M_setstate(__ios_base::badbit); }
125#if _GLIBCXX_EXTERN_TEMPLATE
128#ifdef _GLIBCXX_USE_WCHAR_T
136_GLIBCXX_END_NAMESPACE_VERSION
139#pragma GCC diagnostic pop
basic_ostream< char > ostream
Base class for char output streams.
basic_ostream< wchar_t > wostream
Base class for wchar_t output streams.
ISO C++ entities toplevel namespace is std.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
char_type fill() const
Retrieves the empty character.
Template class basic_ostream.