30#ifndef _OSTREAM_INSERT_H
31#define _OSTREAM_INSERT_H 1
33#pragma GCC system_header
39namespace std _GLIBCXX_VISIBILITY(default)
41_GLIBCXX_BEGIN_NAMESPACE_VERSION
43 template<
typename _CharT,
typename _Traits>
49 typedef typename __ostream_type::ios_base __ios_base;
51 const streamsize __put = __out.rdbuf()->sputn(__s, __n);
53 __out.setstate(__ios_base::badbit);
56 template<
typename _CharT,
typename _Traits>
61 typedef typename __ostream_type::ios_base __ios_base;
63 const _CharT __c = __out.
fill();
64 for (; __n > 0; --__n)
66 const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c);
67 if (_Traits::eq_int_type(__put, _Traits::eof()))
69 __out.setstate(__ios_base::badbit);
75 template<
typename _CharT,
typename _Traits>
81 typedef typename __ostream_type::ios_base __ios_base;
83 typename __ostream_type::sentry __cerb(__out);
91 const bool __left = ((__out.flags()
92 & __ios_base::adjustfield)
95 __ostream_fill(__out, __w - __n);
97 __ostream_write(__out, __s, __n);
98 if (__left && __out.good())
99 __ostream_fill(__out, __w - __n);
102 __ostream_write(__out, __s, __n);
105 __catch(__cxxabiv1::__forced_unwind&)
107 __out._M_setstate(__ios_base::badbit);
108 __throw_exception_again;
111 { __out._M_setstate(__ios_base::badbit); }
118#if _GLIBCXX_EXTERN_TEMPLATE
121#ifdef _GLIBCXX_USE_WCHAR_T
127_GLIBCXX_END_NAMESPACE_VERSION
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.