34 #ifndef _GLIBXX_STREAMBUF
35 #define _GLIBXX_STREAMBUF 1
37 #pragma GCC system_header
46 namespace std _GLIBCXX_VISIBILITY(default)
48 _GLIBCXX_BEGIN_NAMESPACE_VERSION
50 template<
typename _CharT,
typename _Traits>
52 __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*,
53 basic_streambuf<_CharT, _Traits>*,
bool&);
116 template<
typename _CharT,
typename _Traits>
117 class basic_streambuf
147 template<
bool _IsMove,
typename _CharT2>
148 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
153 template<
typename _CharT2>
154 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
159 template<
typename _CharT2,
typename _Traits2>
163 template<
typename _CharT2,
typename _Traits2,
typename _Alloc>
168 template<
typename _CharT2,
typename _Traits2,
typename _Alloc>
237 {
return this->
setbuf(__s, __n); }
250 {
return this->
seekoff(__off, __way, __mode); }
262 {
return this->
seekpos(__sp, __mode); }
284 return __ret ? __ret : this->
showmanyc();
297 int_type __ret = traits_type::eof();
298 if (__builtin_expect(!traits_type::eq_int_type(this->
sbumpc(),
300 __ret = this->
sgetc();
316 if (__builtin_expect(this->
gptr() < this->
egptr(),
true))
318 __ret = traits_type::to_int_type(*this->
gptr());
322 __ret = this->
uflow();
338 if (__builtin_expect(this->
gptr() < this->
egptr(),
true))
339 __ret = traits_type::to_int_type(*this->
gptr());
355 {
return this->
xsgetn(__s, __n); }
372 const bool __testpos = this->
eback() < this->
gptr();
373 if (__builtin_expect(!__testpos ||
374 !traits_type::eq(__c, this->
gptr()[-1]),
false))
375 __ret = this->
pbackfail(traits_type::to_int_type(__c));
379 __ret = traits_type::to_int_type(*this->
gptr());
397 if (__builtin_expect(this->
eback() < this->
gptr(),
true))
400 __ret = traits_type::to_int_type(*this->
gptr());
424 if (__builtin_expect(this->
pptr() < this->
epptr(),
true))
428 __ret = traits_type::to_int_type(__c);
431 __ret = this->
overflow(traits_type::to_int_type(__c));
448 {
return this->
xsputn(__s, __n); }
685 {
return traits_type::eof(); }
699 int_type __ret = traits_type::eof();
700 const bool __testeof = traits_type::eq_int_type(this->
underflow(),
704 __ret = traits_type::to_int_type(*this->
gptr());
722 {
return traits_type::eof(); }
766 {
return traits_type::eof(); }
768 #if _GLIBCXX_USE_DEPRECATED
813 __copy_streambufs_eof(basic_streambuf<char>* __sbin,
814 basic_streambuf<char>* __sbout,
bool& __ineof);
815 #ifdef _GLIBCXX_USE_WCHAR_T
818 __copy_streambufs_eof(basic_streambuf<wchar_t>* __sbin,
819 basic_streambuf<wchar_t>* __sbout,
bool& __ineof);
822 _GLIBCXX_END_NAMESPACE_VERSION