35 #define _OSTREAM_TCC 1 37 #pragma GCC system_header 41 namespace std _GLIBCXX_VISIBILITY(default)
43 _GLIBCXX_BEGIN_NAMESPACE_VERSION
45 template<
typename _CharT,
typename _Traits>
48 : _M_ok(false), _M_os(__os)
60 template<
typename _CharT,
typename _Traits>
61 template<
typename _ValueT>
72 #ifndef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT 76 = use_facet<__num_put_type>(this->_M_ios_locale);
78 if (__np.
put(*
this, *
this, this->fill(), __v).failed())
84 __throw_exception_again;
94 template<
typename _CharT,
typename _Traits>
103 return _M_insert(static_cast<long>(static_cast<unsigned short>(__n)));
105 return _M_insert(static_cast<long>(__n));
108 template<
typename _CharT,
typename _Traits>
117 return _M_insert(static_cast<long>(static_cast<unsigned int>(__n)));
119 return _M_insert(static_cast<long>(__n));
122 template<
typename _CharT,
typename _Traits>
129 if (__cerb && __sbin)
133 if (!__copy_streambufs(__sbin, this->
rdbuf()))
139 __throw_exception_again;
151 template<
typename _CharT,
typename _Traits>
169 if (traits_type::eq_int_type(__put, traits_type::eof()))
175 __throw_exception_again;
185 template<
typename _CharT,
typename _Traits>
203 if (this->
rdbuf()->sputn(__s, __n) != __n)
209 __throw_exception_again;
219 template<
typename _CharT,
typename _Traits>
237 if (this->
rdbuf()->pubsync() == -1)
243 __throw_exception_again;
254 template<
typename _CharT,
typename _Traits>
255 typename basic_ostream<_CharT, _Traits>::pos_type
266 template<
typename _CharT,
typename _Traits>
285 template<
typename _CharT,
typename _Traits>
305 template<
typename _CharT,
typename _Traits>
307 operator<<(basic_ostream<_CharT, _Traits>& __out,
const char* __s)
321 __ptr_guard (_CharT *__ip): __p(__ip) { }
322 ~__ptr_guard() {
delete[] __p; }
323 _CharT* __get() {
return __p; }
324 } __pg (
new _CharT[__clen]);
326 _CharT *__ws = __pg.__get();
327 for (
size_t __i = 0; __i < __clen; ++__i)
328 __ws[__i] = __out.widen(__s[__i]);
329 __ostream_insert(__out, __ws, __clen);
334 __throw_exception_again;
344 #if _GLIBCXX_EXTERN_TEMPLATE 356 extern template ostream& ostream::_M_insert(
long);
357 extern template ostream& ostream::_M_insert(
unsigned long);
358 extern template ostream& ostream::_M_insert(
bool);
359 #ifdef _GLIBCXX_USE_LONG_LONG 360 #pragma GCC diagnostic push 361 #pragma GCC diagnostic ignored "-Wlong-long" 362 extern template ostream& ostream::_M_insert(
long long);
363 extern template ostream& ostream::_M_insert(
unsigned long long);
364 #pragma GCC diagnostic pop 366 extern template ostream& ostream::_M_insert(
double);
367 extern template ostream& ostream::_M_insert(
long double);
368 extern template ostream& ostream::_M_insert(
const void*);
370 #ifdef _GLIBCXX_USE_WCHAR_T 380 extern template wostream& wostream::_M_insert(
long);
381 extern template wostream& wostream::_M_insert(
unsigned long);
382 extern template wostream& wostream::_M_insert(
bool);
383 #ifdef _GLIBCXX_USE_LONG_LONG 384 #pragma GCC diagnostic push 385 #pragma GCC diagnostic ignored "-Wlong-long" 386 extern template wostream& wostream::_M_insert(
long long);
387 extern template wostream& wostream::_M_insert(
unsigned long long);
388 #pragma GCC diagnostic pop 390 extern template wostream& wostream::_M_insert(
double);
391 extern template wostream& wostream::_M_insert(
long double);
392 extern template wostream& wostream::_M_insert(
const void*);
396 _GLIBCXX_END_NAMESPACE_VERSION
static const openmode out
Open for output. Default for ofstream and fstream.
basic_ostream< _CharT, _Traits > & ends(basic_ostream< _CharT, _Traits > &__os)
Write a null character into the output sequence.
bool good() const
Fast error checking.
static const iostate failbit
Indicates that an input operation failed to read the expected characters, or that an output operation...
static const fmtflags basefield
A mask of dec|oct|hex. Useful for the 2-arg form of setf.
basic_ostream< _CharT, _Traits > * tie() const
Fetches the current tied stream.
sentry(basic_ostream< _CharT, _Traits > &__os)
The constructor performs preparatory work.
_Traits::int_type int_type
Performs setup work for output streams.
pos_type tellp()
Getting the current write position.
ISO C++ entities toplevel namespace is std.
Basis for explicit traits specializations.
void setstate(iostate __state)
Sets additional flags in the error state.
__ostream_type & operator<<(__ostream_type &(*__pf)(__ostream_type &))
Interface for manipulators.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
basic_streambuf< _CharT, _Traits > * rdbuf() const
Accessing the underlying buffer.
__ostream_type & seekp(pos_type)
Changing the current write position.
static const fmtflags oct
Converts integer input or generates integer output in octal base.
fmtflags flags() const
Access to format flags.
bool bad() const
Fast error checking.
Thrown as part of forced unwinding.A magic placeholder class that can be caught by reference to recog...
Template class basic_ostream.
static const iostate goodbit
Indicates all is well.
_Traits::pos_type pos_type
__ostream_type & put(char_type __c)
Simple insertion.
static const iostate badbit
Indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error fro...
static const seekdir cur
Request a seek relative to the current position within the sequence.
_Traits::off_type off_type
__ostream_type & write(const char_type *__s, streamsize __n)
Character string insertion.
bool fail() const
Fast error checking.
static const fmtflags hex
Converts integer input or generates integer output in hexadecimal base.
Primary class template num_put.This facet encapsulates the code to convert a number to a string...
iter_type put(iter_type __s, ios_base &__io, char_type __fill, bool __v) const
Numeric formatting.
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
Write a newline and flush the stream.
__ostream_type & flush()
Synchronizing the stream buffer.