35 #ifndef _GLIBCXX_OSTREAM
36 #define _GLIBCXX_OSTREAM 1
38 #pragma GCC system_header
43 namespace std _GLIBCXX_VISIBILITY(default)
45 _GLIBCXX_BEGIN_NAMESPACE_VERSION
56 template<
typename _CharT,
typename _Traits>
57 class basic_ostream :
virtual public basic_ios<_CharT, _Traits>
61 typedef _CharT char_type;
62 typedef typename _Traits::int_type int_type;
63 typedef typename _Traits::pos_type pos_type;
64 typedef typename _Traits::off_type off_type;
65 typedef _Traits traits_type;
68 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
69 typedef basic_ios<_CharT, _Traits> __ios_type;
70 typedef basic_ostream<_CharT, _Traits> __ostream_type;
71 typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
73 typedef ctype<_CharT> __ctype_type;
168 {
return _M_insert(__n); }
172 {
return _M_insert(__n); }
176 {
return _M_insert(__n); }
186 return _M_insert(static_cast<unsigned long>(__n));
197 return _M_insert(static_cast<unsigned long>(__n));
200 #ifdef _GLIBCXX_USE_LONG_LONG
203 {
return _M_insert(__n); }
207 {
return _M_insert(__n); }
212 {
return _M_insert(__f); }
219 return _M_insert(static_cast<double>(__f));
224 {
return _M_insert(__f); }
228 {
return _M_insert(__p); }
360 seekp(off_type, ios_base::seekdir);
366 template<
typename _ValueT>
368 _M_insert(_ValueT __v);
378 template <
typename _CharT,
typename _Traits>
413 if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)
425 #ifdef __GXX_EXPERIMENTAL_CXX0X__
428 operator bool()
const
449 template<
typename _CharT,
typename _Traits>
451 operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
452 {
return __ostream_insert(__out, &__c, 1); }
454 template<
typename _CharT,
typename _Traits>
455 inline basic_ostream<_CharT, _Traits>&
456 operator<<(basic_ostream<_CharT, _Traits>& __out,
char __c)
457 {
return (__out << __out.widen(__c)); }
460 template <
class _Traits>
461 inline basic_ostream<char, _Traits>&
462 operator<<(basic_ostream<char, _Traits>& __out,
char __c)
463 {
return __ostream_insert(__out, &__c, 1); }
466 template<
class _Traits>
467 inline basic_ostream<char, _Traits>&
468 operator<<(basic_ostream<char, _Traits>& __out,
signed char __c)
469 {
return (__out << static_cast<char>(__c)); }
471 template<
class _Traits>
472 inline basic_ostream<char, _Traits>&
473 operator<<(basic_ostream<char, _Traits>& __out,
unsigned char __c)
474 {
return (__out << static_cast<char>(__c)); }
491 template<
typename _CharT,
typename _Traits>
492 inline basic_ostream<_CharT, _Traits>&
493 operator<<(basic_ostream<_CharT, _Traits>& __out,
const _CharT* __s)
498 __ostream_insert(__out, __s,
499 static_cast<streamsize>(_Traits::length(__s)));
503 template<
typename _CharT,
typename _Traits>
504 basic_ostream<_CharT, _Traits> &
505 operator<<(basic_ostream<_CharT, _Traits>& __out,
const char* __s);
508 template<
class _Traits>
509 inline basic_ostream<char, _Traits>&
510 operator<<(basic_ostream<char, _Traits>& __out,
const char* __s)
515 __ostream_insert(__out, __s,
516 static_cast<streamsize>(_Traits::length(__s)));
521 template<
class _Traits>
522 inline basic_ostream<char, _Traits>&
523 operator<<(basic_ostream<char, _Traits>& __out,
const signed char* __s)
524 {
return (__out << reinterpret_cast<const char*>(__s)); }
526 template<
class _Traits>
527 inline basic_ostream<char, _Traits> &
528 operator<<(basic_ostream<char, _Traits>& __out,
const unsigned char* __s)
529 {
return (__out << reinterpret_cast<const char*>(__s)); }
541 template<
typename _CharT,
typename _Traits>
542 inline basic_ostream<_CharT, _Traits>&
544 {
return flush(__os.put(__os.widen(
'\n'))); }
552 template<
typename _CharT,
typename _Traits>
553 inline basic_ostream<_CharT, _Traits>&
555 {
return __os.put(_CharT()); }
562 template<
typename _CharT,
typename _Traits>
563 inline basic_ostream<_CharT, _Traits>&
565 {
return __os.flush(); }
567 #ifdef __GXX_EXPERIMENTAL_CXX0X__
579 template<
typename _CharT,
typename _Traits,
typename _Tp>
580 inline basic_ostream<_CharT, _Traits>&
581 operator<<(basic_ostream<_CharT, _Traits>&& __os,
const _Tp& __x)
582 {
return (__os << __x); }
583 #endif // __GXX_EXPERIMENTAL_CXX0X__
585 _GLIBCXX_END_NAMESPACE_VERSION