33 #ifndef _GLIBCXX_ISTREAM 34 #define _GLIBCXX_ISTREAM 1 36 #pragma GCC system_header 41 namespace std _GLIBCXX_VISIBILITY(default)
43 _GLIBCXX_BEGIN_NAMESPACE_VERSION
57 template<
typename _CharT,
typename _Traits>
58 class basic_istream :
virtual public basic_ios<_CharT, _Traits>
62 typedef _CharT char_type;
63 typedef typename _Traits::int_type int_type;
64 typedef typename _Traits::pos_type pos_type;
65 typedef typename _Traits::off_type off_type;
66 typedef _Traits traits_type;
69 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
70 typedef basic_ios<_CharT, _Traits> __ios_type;
71 typedef basic_istream<_CharT, _Traits> __istream_type;
72 typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
74 typedef ctype<_CharT> __ctype_type;
121 {
return __pf(*
this); }
169 {
return _M_extract(__n); }
176 {
return _M_extract(__n); }
183 {
return _M_extract(__n); }
187 {
return _M_extract(__n); }
191 {
return _M_extract(__n); }
193 #ifdef _GLIBCXX_USE_LONG_LONG 196 {
return _M_extract(__n); }
200 {
return _M_extract(__n); }
215 {
return _M_extract(__f); }
219 {
return _M_extract(__f); }
223 {
return _M_extract(__f); }
236 {
return _M_extract(__p); }
343 get(char_type* __s,
streamsize __n, char_type __delim);
355 {
return this->
get(__s, __n, this->
widen(
'\n')); }
377 get(__streambuf_type& __sb, char_type __delim);
387 get(__streambuf_type& __sb)
388 {
return this->
get(__sb, this->
widen(
'\n')); }
602 seekg(off_type, ios_base::seekdir);
610 #if __cplusplus >= 201103L 614 : __ios_type(),
_M_gcount(__rhs._M_gcount)
616 __ios_type::move(__rhs);
634 __ios_type::swap(__rhs);
635 std::swap(_M_gcount, __rhs._M_gcount);
639 template<
typename _ValueT>
641 _M_extract(_ValueT& __v);
660 #ifdef _GLIBCXX_USE_WCHAR_T 685 template<
typename _CharT,
typename _Traits>
697 typedef typename _Traits::int_type __int_type;
731 #if __cplusplus >= 201103L 734 operator bool()
const 750 template<
typename _CharT,
typename _Traits>
754 template<
class _Traits>
757 {
return (__in >> reinterpret_cast<char&>(__c)); }
759 template<
class _Traits>
762 {
return (__in >> reinterpret_cast<char&>(__c)); }
792 template<
typename _CharT,
typename _Traits>
801 template<
class _Traits>
804 {
return (__in >> reinterpret_cast<char*>(__s)); }
806 template<
class _Traits>
809 {
return (__in >> reinterpret_cast<char*>(__s)); }
823 template<
typename _CharT,
typename _Traits>
832 typedef _CharT char_type;
833 typedef typename _Traits::int_type int_type;
834 typedef typename _Traits::pos_type pos_type;
835 typedef typename _Traits::off_type off_type;
836 typedef _Traits traits_type;
850 : __istream_type(__sb), __ostream_type(__sb) { }
860 : __istream_type(), __ostream_type() { }
862 #if __cplusplus >= 201103L 866 : __istream_type(std::move(__rhs)), __ostream_type(*
this)
882 { __istream_type::swap(__rhs); }
906 template<
typename _CharT,
typename _Traits>
910 #if __cplusplus >= 201103L 912 template<
typename _Tp>
913 struct __is_convertible_to_basic_istream
915 template<
typename _Ch,
typename _Up>
918 static void __check(...);
921 decltype(__check(declval<
typename remove_reference<_Tp>::type*>()));
922 using type = __not_<is_same<istream_type, void>>;
923 constexpr
static bool value = type::value;
926 template<
typename _Istream,
typename _Tp,
typename =
void>
929 template<
typename _Istream,
typename _Tp>
930 struct __is_extractable<_Istream, _Tp,
931 __void_t<decltype(declval<_Istream&>()
948 template<
typename _Istream,
typename _Tp>
950 typename enable_if<__and_<__not_<is_lvalue_reference<_Istream>>,
951 __is_convertible_to_basic_istream<_Istream>,
952 __is_extractable<_Istream&, _Tp&&>>::value,
953 typename __is_convertible_to_basic_istream<
954 _Istream>::istream_type>::type
957 __is >> std::forward<_Tp>(__x);
962 _GLIBCXX_END_NAMESPACE_VERSION
__istream_type & operator>>(float &__f)
Floating point arithmetic extractors.
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
__istream_type & operator>>(unsigned long long &__n)
Integer arithmetic extractors.
__istream_type & operator>>(long &__n)
Integer arithmetic extractors.
Template class basic_iostream.
__istream_type & operator>>(bool &__n)
Integer arithmetic extractors.
char_type widen(char __c) const
Widens characters.
__istream_type & operator>>(ios_base &(*__pf)(ios_base &))
Interface for manipulators.
__istream_type & operator>>(void *&__p)
Basic arithmetic extractors.
virtual ~basic_istream()
Base destructor.
The actual work of input and output (interface).
ISO C++ entities toplevel namespace is std.
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
__istream_type & operator>>(unsigned short &__n)
Integer arithmetic extractors.
Primary class template ctype facet.This template class defines classification and conversion function...
int_type peek()
Looking ahead in the stream.
__istream_type & operator>>(unsigned long &__n)
Integer arithmetic extractors.
Template class basic_ostream.
__istream_type & operator>>(long double &__f)
Floating point arithmetic extractors.
virtual ~basic_iostream()
Destructor does nothing.
__istream_type & operator>>(__istream_type &(*__pf)(__istream_type &))
Interface for manipulators.
__istream_type & getline(char_type *__s, streamsize __n)
String extraction.
__istream_type & unget()
Unextracting the previous character.
_Traits traits_type
Easy access to dependent types.
__istream_type & operator>>(long long &__n)
Integer arithmetic extractors.
__istream_type & operator>>(__ios_type &(*__pf)(__ios_type &))
Interface for manipulators.
__istream_type & putback(char_type __c)
Unextracting a single character.
__istream_type & read(char_type *__s, streamsize __n)
Extraction without delimiters.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
basic_istream(__streambuf_type *__sb)
Base constructor.
__istream_type & getline(char_type *__s, streamsize __n, char_type __delim)
String extraction.
__istream_type & ignore()
Simple extraction.
streamsize readsome(char_type *__s, streamsize __n)
Extraction until the buffer is exhausted, but no more.
__istream_type & seekg(pos_type)
Changing the current read position.
streamsize gcount() const
Character counting.
pos_type tellg()
Getting the current read position.
__istream_type & operator>>(unsigned int &__n)
Integer arithmetic extractors.
__istream_type & operator>>(double &__f)
Floating point arithmetic extractors.
Template class basic_istream.
Performs setup work for input streams.
basic_iostream(basic_streambuf< _CharT, _Traits > *__sb)
Constructor does nothing.
int sync()
Synchronizing the stream buffer.
basic_istream< _CharT, _Traits > & ws(basic_istream< _CharT, _Traits > &__is)
Quick and easy way to eat whitespace.