Provided by: libstdc++-9-doc_9.4.0-1ubuntu1~20.04.2_all bug

NAME

       std::basic_ifstream< _CharT, _Traits > - Controlling input for files.

SYNOPSIS

       Inherits std::basic_istream< _CharT, _Traits >.

   Public Types
       typedef ctype< _CharT > __ctype_type
       typedef basic_filebuf< char_type, traits_type > __filebuf_type
       typedef basic_ios< _CharT, _Traits > __ios_type
       typedef basic_istream< char_type, traits_type > __istream_type
       typedef num_get< _CharT, istreambuf_iterator< _CharT, _Traits > > __num_get_type
       typedef basic_streambuf< _CharT, _Traits > __streambuf_type
       typedef _CharT char_type
       typedef traits_type::int_type int_type
       typedef traits_type::off_type off_type
       typedef traits_type::pos_type pos_type
       typedef _Traits traits_type

   Public Member Functions
       basic_ifstream ()
           Default constructor.
       basic_ifstream (basic_ifstream &&__rhs)
       basic_ifstream (const basic_ifstream &)=delete
       basic_ifstream (const char *__s, ios_base::openmode __mode=ios_base::in)
           Create an input file stream.
       basic_ifstream (const std::string &__s, ios_base::openmode __mode=ios_base::in)
           Create an input file stream.
       ~basic_ifstream ()
           The destructor does nothing.
       template<typename _ValueT > basic_istream< _CharT, _Traits > & _M_extract (_ValueT &__v)
       void close ()
           Close the file.
       streamsize gcount () const
           Character counting.
       basic_istream< char > & getline (char_type *__s, streamsize __n, char_type __delim)
           Explicit specialization declarations, defined in src/istream.cc.
       basic_istream< wchar_t > & getline (char_type *__s, streamsize __n, char_type __delim)
       basic_istream< char > & ignore (streamsize __n)
       basic_istream< wchar_t > & ignore (streamsize __n)
       basic_istream< char > & ignore (streamsize __n, int_type __delim)
       basic_istream< wchar_t > & ignore (streamsize __n, int_type __delim)
       bool is_open ()
           Wrapper to test for an open file.
       bool is_open () const
       void open (const char *__s, ios_base::openmode __mode=ios_base::in)
           Opens an external file.
       void open (const std::string &__s, ios_base::openmode __mode=ios_base::in)
           Opens an external file.
       basic_ifstream & operator= (basic_ifstream &&__rhs)
       basic_ifstream & operator= (const basic_ifstream &)=delete
       __istream_type & operator>> (__streambuf_type *__sb)
           Extracting into another streambuf.
       __istream_type & operator>> (void *&__p)
           Basic arithmetic extractors.
       __filebuf_type * rdbuf () const
           Accessing the underlying buffer.
       void swap (basic_ifstream &__rhs)

           __istream_type & operator>> (__istream_type &(*__pf)(__istream_type &))
               Interface for manipulators.
           __istream_type & operator>> (__ios_type &(*__pf)(__ios_type &))
               Interface for manipulators.
           __istream_type & operator>> (ios_base &(*__pf)(ios_base &))
               Interface for manipulators.

       Extractors
       All the operator>> functions (aka formatted input functions) have some common behavior.
       Each starts by constructing a temporary object of type std::basic_istream::sentry with the
       second argument (noskipws) set to false. This has several effects, concluding with the
       setting of a status flag; see the sentry documentation for more.

       If the sentry status is good, the function tries to extract whatever data is appropriate
       for the type of the argument.

       If an exception is thrown during extraction, ios_base::badbit will be turned on in the
       stream's error state (without causing an ios_base::failure to be thrown) and the original
       exception will be rethrown if badbit is set in the exceptions mask.

           __istream_type & operator>> (bool &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (short &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (unsigned short &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (int &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (unsigned int &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (long &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (unsigned long &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (long long &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (unsigned long long &__n)
               Integer arithmetic extractors.

           __istream_type & operator>> (float &__f)
               Floating point arithmetic extractors.
           __istream_type & operator>> (double &__f)
               Floating point arithmetic extractors.
           __istream_type & operator>> (long double &__f)
               Floating point arithmetic extractors.

       Unformatted Input Functions
       All the unformatted input functions have some common behavior. Each starts by constructing
       a temporary object of type std::basic_istream::sentry with the second argument (noskipws)
       set to true. This has several effects, concluding with the setting of a status flag; see
       the sentry documentation for more.

       If the sentry status is good, the function tries to extract whatever data is appropriate
       for the type of the argument.

       The number of characters extracted is stored for later retrieval by gcount().

       If an exception is thrown during extraction, ios_base::badbit will be turned on in the
       stream's error state (without causing an ios_base::failure to be thrown) and the original
       exception will be rethrown if badbit is set in the exceptions mask.

           int_type get ()
               Simple extraction.
           __istream_type & get (char_type &__c)
               Simple extraction.
           __istream_type & get (char_type *__s, streamsize __n, char_type __delim)
               Simple multiple-character extraction.
           __istream_type & get (char_type *__s, streamsize __n)
               Simple multiple-character extraction.
           __istream_type & get (__streambuf_type &__sb, char_type __delim)
               Extraction into another streambuf.
           __istream_type & get (__streambuf_type &__sb)
               Extraction into another streambuf.
           __istream_type & getline (char_type *__s, streamsize __n, char_type __delim)
               String extraction.
           __istream_type & getline (char_type *__s, streamsize __n)
               String extraction.
           __istream_type & ignore (streamsize __n, int_type __delim)
               Discarding characters.
           __istream_type & ignore (streamsize __n)
               Simple extraction.
           __istream_type & ignore ()
               Simple extraction.
           int_type peek ()
               Looking ahead in the stream.
           __istream_type & read (char_type *__s, streamsize __n)
               Extraction without delimiters.
           streamsize readsome (char_type *__s, streamsize __n)
               Extraction until the buffer is exhausted, but no more.
           __istream_type & putback (char_type __c)
               Unextracting a single character.
           __istream_type & unget ()
               Unextracting the previous character.
           int sync ()
               Synchronizing the stream buffer.
           pos_type tellg ()
               Getting the current read position.
           __istream_type & seekg (pos_type)
               Changing the current read position.
           __istream_type & seekg (off_type, ios_base::seekdir)
               Changing the current read position.

           __istream_type & operator>> (__istream_type &(*__pf)(__istream_type &))
               Interface for manipulators.
           __istream_type & operator>> (__ios_type &(*__pf)(__ios_type &))
               Interface for manipulators.
           __istream_type & operator>> (ios_base &(*__pf)(ios_base &))
               Interface for manipulators.

       Extractors
       All the operator>> functions (aka formatted input functions) have some common behavior.
       Each starts by constructing a temporary object of type std::basic_istream::sentry with the
       second argument (noskipws) set to false. This has several effects, concluding with the
       setting of a status flag; see the sentry documentation for more.

       If the sentry status is good, the function tries to extract whatever data is appropriate
       for the type of the argument.

       If an exception is thrown during extraction, ios_base::badbit will be turned on in the
       stream's error state (without causing an ios_base::failure to be thrown) and the original
       exception will be rethrown if badbit is set in the exceptions mask.

           __istream_type & operator>> (bool &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (short &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (unsigned short &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (int &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (unsigned int &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (long &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (unsigned long &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (long long &__n)
               Integer arithmetic extractors.
           __istream_type & operator>> (unsigned long long &__n)
               Integer arithmetic extractors.

           __istream_type & operator>> (float &__f)
               Floating point arithmetic extractors.
           __istream_type & operator>> (double &__f)
               Floating point arithmetic extractors.
           __istream_type & operator>> (long double &__f)
               Floating point arithmetic extractors.

       Unformatted Input Functions
       All the unformatted input functions have some common behavior. Each starts by constructing
       a temporary object of type std::basic_istream::sentry with the second argument (noskipws)
       set to true. This has several effects, concluding with the setting of a status flag; see
       the sentry documentation for more.

       If the sentry status is good, the function tries to extract whatever data is appropriate
       for the type of the argument.

       The number of characters extracted is stored for later retrieval by gcount().

       If an exception is thrown during extraction, ios_base::badbit will be turned on in the
       stream's error state (without causing an ios_base::failure to be thrown) and the original
       exception will be rethrown if badbit is set in the exceptions mask.

           int_type get ()
               Simple extraction.
           __istream_type & get (char_type &__c)
               Simple extraction.
           __istream_type & get (char_type *__s, streamsize __n, char_type __delim)
               Simple multiple-character extraction.
           __istream_type & get (char_type *__s, streamsize __n)
               Simple multiple-character extraction.
           __istream_type & get (__streambuf_type &__sb, char_type __delim)
               Extraction into another streambuf.
           __istream_type & get (__streambuf_type &__sb)
               Extraction into another streambuf.
           __istream_type & getline (char_type *__s, streamsize __n, char_type __delim)
               String extraction.
           __istream_type & getline (char_type *__s, streamsize __n)
               String extraction.
           __istream_type & ignore (streamsize __n, int_type __delim)
               Discarding characters.
           __istream_type & ignore (streamsize __n)
               Simple extraction.
           __istream_type & ignore ()
               Simple extraction.
           int_type peek ()
               Looking ahead in the stream.
           __istream_type & read (char_type *__s, streamsize __n)
               Extraction without delimiters.
           streamsize readsome (char_type *__s, streamsize __n)
               Extraction until the buffer is exhausted, but no more.
           __istream_type & putback (char_type __c)
               Unextracting a single character.
           __istream_type & unget ()
               Unextracting the previous character.
           int sync ()
               Synchronizing the stream buffer.
           pos_type tellg ()
               Getting the current read position.
           __istream_type & seekg (pos_type)
               Changing the current read position.
           __istream_type & seekg (off_type, ios_base::seekdir)
               Changing the current read position.

   Protected Member Functions
       template<typename _ValueT > __istream_type & _M_extract (_ValueT &__v)
       void swap (basic_istream &__rhs)

   Protected Attributes
       streamsize _M_gcount

Detailed Description

   template<typename _CharT, typename _Traits>
       class std::basic_ifstream< _CharT, _Traits >" Controlling input for files.

       Template Parameters
           _CharT Type of character stream.
           _Traits Traits for character type, defaults to char_traits<_CharT>.

       This class supports reading from named files, using the inherited functions from
       std::basic_istream. To control the associated sequence, an instance of std::basic_filebuf
       is used, which this page refers to as sb.

       Definition at line 492 of file fstream.

Constructor & Destructor Documentation

   template<typename _CharT , typename _Traits > std::basic_ifstream< _CharT, _Traits
       >::basic_ifstream () [inline]
       Default constructor. Initializes sb using its default constructor, and passes &sb to the
       base class initializer. Does not open any files (you haven't given it a filename to open).

       Definition at line 518 of file fstream.

   template<typename _CharT , typename _Traits > std::basic_ifstream< _CharT, _Traits
       >::basic_ifstream (const char * __s, ios_base::openmode __mode = ios_base::in) [inline],
       [explicit]
       Create an input file stream.

       Parameters
           __s Null terminated string specifying the filename.
           __mode Open file in specified mode (see std::ios_base).

       ios_base::in is automatically included in __mode.

       Definition at line 529 of file fstream.

   template<typename _CharT , typename _Traits > std::basic_ifstream< _CharT, _Traits
       >::basic_ifstream (const std::string & __s, ios_base::openmode __mode = ios_base::in)
       [inline],  [explicit]
       Create an input file stream.

       Parameters
           __s std::string specifying the filename.
           __mode Open file in specified mode (see std::ios_base).

       ios_base::in is automatically included in __mode.

       Definition at line 562 of file fstream.

   template<typename _CharT , typename _Traits > std::basic_ifstream< _CharT, _Traits
       >::~basic_ifstream () [inline]
       The destructor does nothing. The file is closed by the filebuf object, not the formatting
       stream.

       Definition at line 599 of file fstream.

Member Function Documentation

   template<typename _CharT , typename _Traits > void std::basic_ifstream< _CharT, _Traits
       >::close () [inline]
       Close the file. Calls std::basic_filebuf::close(). If that function fails, failbit is set
       in the stream's error state.

       Definition at line 730 of file fstream.

   template<typename _CharT , typename _Traits > streamsize std::basic_istream< _CharT, _Traits
       >::gcount () const [inline],  [inherited]
       Character counting.

       Returns
           The number of characters extracted by the previous unformatted input function
           dispatched for this stream.

       Definition at line 269 of file istream.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits >::int_type
       std::basic_istream< _CharT, _Traits >::get [inherited]
       Simple extraction.

       Returns
           A character, or eof().

       Tries to extract a character. If none are available, sets failbit and returns
       traits::eof().

       Definition at line 244 of file istream.tcc.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::get (__streambuf_type & __sb) [inline],  [inherited]
       Extraction into another streambuf.

       Parameters
           __sb A streambuf in which to store data.

       Returns
           *this

       Returns get(__sb,widen('\n')).

       Definition at line 387 of file istream.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::get (__streambuf_type & __sb, char_type __delim)
       [inherited]
       Extraction into another streambuf.

       Parameters
           __sb A streambuf in which to store data.
           __delim A 'stop' character.

       Returns
           *this

       Characters are extracted and inserted into __sb until one of the following happens:

       • the input sequence reaches EOF

       • insertion into the output buffer fails (in this case, the character that would have been
         inserted is not extracted)

       • the next character equals __delim (in this case, the character is not extracted)

       • an exception occurs (and in this case is caught)

       If no characters are stored, failbit is set in the stream's error state.

       Definition at line 364 of file istream.tcc.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::get (char_type & __c) [inherited]
       Simple extraction.

       Parameters
           __c The character in which to store data.

       Returns
           *this

       Tries to extract a character and store it in __c. If none are available, sets failbit and
       returns traits::eof().

       Note
           This function is not overloaded on signed char and unsigned char.

       Definition at line 280 of file istream.tcc.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::get (char_type * __s, streamsize __n) [inline],  [inherited]
       Simple multiple-character extraction.

       Parameters
           __s Pointer to an array.
           __n Maximum number of characters to store in s.

       Returns
           *this

       Returns get(__s,__n,widen('\n')).

       Definition at line 354 of file istream.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::get (char_type * __s, streamsize __n, char_type
       __delim) [inherited]
       Simple multiple-character extraction.

       Parameters
           __s Pointer to an array.
           __n Maximum number of characters to store in __s.
           __delim A 'stop' character.

       Returns
           *this

       Characters are extracted and stored into __s until one of the following happens:

       • __n-1 characters are stored

       • the input sequence reaches EOF

       • the next character equals __delim, in which case the character is not extracted

       If no characters are stored, failbit is set in the stream's error state.

       In any case, a null character is stored into the next location in the array.

       Note
           This function is not overloaded on signed char and unsigned char.

       Definition at line 317 of file istream.tcc.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::getline (char_type * __s, streamsize __n) [inline],  [inherited]
       String extraction.

       Parameters
           __s A character array in which to store the data.
           __n Maximum number of characters to extract.

       Returns
           *this

       Returns getline(__s,__n,widen('\n')).

       Definition at line 427 of file istream.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::getline (char_type * __s, streamsize __n, char_type
       __delim) [inherited]
       String extraction.

       Parameters
           __s A character array in which to store the data.
           __n Maximum number of characters to extract.
           __delim A 'stop' character.

       Returns
           *this

       Extracts and stores characters into __s until one of the following happens. Note that
       these criteria are required to be tested in the order listed here, to allow an input line
       to exactly fill the __s array without setting failbit.

       1.  the input sequence reaches end-of-file, in which case eofbit is set in the stream
           error state

       2.  the next character equals __delim, in which case the character is extracted (and
           therefore counted in gcount()) but not stored

       3.  __n-1 characters are stored, in which case failbit is set in the stream error state

       If no characters are extracted, failbit is set. (An empty line of input should therefore
       not cause failbit to be set.)

       In any case, a null character is stored in the next location in the array.

       Definition at line 408 of file istream.tcc.

   basic_istream< char > & std::basic_istream< char >::getline (char_type * __s, streamsize __n,
       char_type __delim) [inherited]
       Explicit specialization declarations, defined in src/istream.cc.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::ignore [inherited]
       Simple extraction.

       Returns
           A character, or eof().

       Tries to extract a character. If none are available, sets failbit and returns
       traits::eof().

       Definition at line 468 of file istream.tcc.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::ignore (streamsize __n) [inherited]
       Simple extraction.

       Returns
           A character, or eof().

       Tries to extract a character. If none are available, sets failbit and returns
       traits::eof().

       Definition at line 501 of file istream.tcc.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::ignore (streamsize __n, int_type __delim)
       [inherited]
       Discarding characters.

       Parameters
           __n Number of characters to discard.
           __delim A 'stop' character.

       Returns
           *this

       Extracts characters and throws them away until one of the following happens:

       • if __n != std::numeric_limits<int>::max(), __n characters are extracted

       • the input sequence reaches end-of-file

       • the next character equals __delim (in this case, the character is extracted); note that
         this condition will never occur if __delim equals traits::eof().

       NB: Provide three overloads, instead of the single function (with defaults) mandated by
       the Standard: this leads to a better performing implementation, while still conforming to
       the Standard.

       Definition at line 563 of file istream.tcc.

   template<typename _CharT , typename _Traits > bool std::basic_ifstream< _CharT, _Traits
       >::is_open () [inline]
       Wrapper to test for an open file.

       Returns
           rdbuf()->is_open()

       Definition at line 640 of file fstream.

   template<typename _CharT , typename _Traits > void std::basic_ifstream< _CharT, _Traits
       >::open (const char * __s, ios_base::openmode __mode = ios_base::in) [inline]
       Opens an external file.

       Parameters
           __s The name of the file.
           __mode The open mode flags.

       Calls std::basic_filebuf::open(s,__mode|in). If that function fails, failbit is set in the
       stream's error state.

       Definition at line 658 of file fstream.

   template<typename _CharT , typename _Traits > void std::basic_ifstream< _CharT, _Traits
       >::open (const std::string & __s, ios_base::openmode __mode = ios_base::in) [inline]
       Opens an external file.

       Parameters
           __s The name of the file.
           __mode The open mode flags.

       Calls std::basic_filebuf::open(__s,__mode|in). If that function fails, failbit is set in
       the stream's error state.

       Definition at line 697 of file fstream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (__ios_type &(*)(__ios_type &) __pf) [inline],  [inherited]
       Interface for manipulators. Manipulators such as std::ws and std::dec use these functions
       in constructs like std::cin >> std::ws. For more information, see the iomanip header.

       Definition at line 124 of file istream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (__istream_type &(*)(__istream_type &) __pf) [inline],  [inherited]
       Interface for manipulators. Manipulators such as std::ws and std::dec use these functions
       in constructs like std::cin >> std::ws. For more information, see the iomanip header.

       Definition at line 120 of file istream.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::operator>> (__streambuf_type * __sb) [inherited]
       Extracting into another streambuf.

       Parameters
           __sb A pointer to a streambuf

       This function behaves like one of the basic arithmetic extractors, in that it also
       constructs a sentry object and has the same error handling behavior.

       If __sb is NULL, the stream will set failbit in its error state.

       Characters are extracted from this stream and inserted into the __sb streambuf until one
       of the following occurs:

       • the input stream reaches end-of-file,

       • insertion into the output buffer fails (in this case, the character that would have been
         inserted is not extracted), or

       • an exception occurs (and in this case is caught)

       If the function inserts no characters, failbit is set.

       Definition at line 212 of file istream.tcc.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (bool & __n) [inline],  [inherited]
       Integer arithmetic extractors.

       Parameters
           __n A variable of builtin integral type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 168 of file istream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (double & __f) [inline],  [inherited]
       Floating point arithmetic extractors.

       Parameters
           __f A variable of builtin floating point type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 218 of file istream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (float & __f) [inline],  [inherited]
       Floating point arithmetic extractors.

       Parameters
           __f A variable of builtin floating point type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 214 of file istream.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::operator>> (int & __n) [inherited]
       Integer arithmetic extractors.

       Parameters
           __n A variable of builtin integral type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 167 of file istream.tcc.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (ios_base &(*)(ios_base &) __pf) [inline],  [inherited]
       Interface for manipulators. Manipulators such as std::ws and std::dec use these functions
       in constructs like std::cin >> std::ws. For more information, see the iomanip header.

       Definition at line 131 of file istream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (long & __n) [inline],  [inherited]
       Integer arithmetic extractors.

       Parameters
           __n A variable of builtin integral type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 186 of file istream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (long double & __f) [inline],  [inherited]
       Floating point arithmetic extractors.

       Parameters
           __f A variable of builtin floating point type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 222 of file istream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (long long & __n) [inline],  [inherited]
       Integer arithmetic extractors.

       Parameters
           __n A variable of builtin integral type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 195 of file istream.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::operator>> (short & __n) [inherited]
       Integer arithmetic extractors.

       Parameters
           __n A variable of builtin integral type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 122 of file istream.tcc.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (unsigned int & __n) [inline],  [inherited]
       Integer arithmetic extractors.

       Parameters
           __n A variable of builtin integral type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 182 of file istream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (unsigned long & __n) [inline],  [inherited]
       Integer arithmetic extractors.

       Parameters
           __n A variable of builtin integral type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 190 of file istream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (unsigned long long & __n) [inline],  [inherited]
       Integer arithmetic extractors.

       Parameters
           __n A variable of builtin integral type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 199 of file istream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (unsigned short & __n) [inline],  [inherited]
       Integer arithmetic extractors.

       Parameters
           __n A variable of builtin integral type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 175 of file istream.

   template<typename _CharT , typename _Traits > __istream_type& std::basic_istream< _CharT,
       _Traits >::operator>> (void *& __p) [inline],  [inherited]
       Basic arithmetic extractors.

       Parameters
           __p A variable of pointer type.

       Returns
           *this if successful

       These functions use the stream's current locale (specifically, the num_get facet) to parse
       the input data.

       Definition at line 235 of file istream.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits >::int_type
       std::basic_istream< _CharT, _Traits >::peek [inherited]
       Looking ahead in the stream.

       Returns
           The next character, or eof().

       If, after constructing the sentry object, good() is false, returns traits::eof().
       Otherwise reads but does not extract the next input character.

       Definition at line 628 of file istream.tcc.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::putback (char_type __c) [inherited]
       Unextracting a single character.

       Parameters
           __c The character to push back into the input stream.

       Returns
           *this

       If rdbuf() is not null, calls rdbuf()->sputbackc(c).

       If rdbuf() is null or if sputbackc() fails, sets badbit in the error state.

       Note
           This function first clears eofbit. Since no characters are extracted, the next call to
           gcount() will return 0, as required by DR 60.

       Definition at line 719 of file istream.tcc.

   template<typename _CharT , typename _Traits > __filebuf_type* std::basic_ifstream< _CharT,
       _Traits >::rdbuf () const [inline]
       Accessing the underlying buffer.

       Returns
           The current basic_filebuf buffer.

       This hides both signatures of std::basic_ios::rdbuf().

       Definition at line 632 of file fstream.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::read (char_type * __s, streamsize __n) [inherited]
       Extraction without delimiters.

       Parameters
           __s A character array.
           __n Maximum number of characters to store.

       Returns
           *this

       If the stream state is good(), extracts characters and stores them into __s until one of
       the following happens:

       • __n characters are stored

       • the input sequence reaches end-of-file, in which case the error state is set to
         failbit|eofbit.

       Note
           This function is not overloaded on signed char and unsigned char.

       Definition at line 658 of file istream.tcc.

   template<typename _CharT , typename _Traits > streamsize std::basic_istream< _CharT, _Traits
       >::readsome (char_type * __s, streamsize __n) [inherited]
       Extraction until the buffer is exhausted, but no more.

       Parameters
           __s A character array.
           __n Maximum number of characters to store.

       Returns
           The number of characters extracted.

       Extracts characters and stores them into __s depending on the number of characters
       remaining in the streambuf's buffer, rdbuf()->in_avail(), called A here:

       • if A == -1, sets eofbit and extracts no characters

       • if A == 0, extracts no characters

       • if A > 0, extracts min(A,n)

       The goal is to empty the current buffer, and to not request any more from the external
       input sequence controlled by the streambuf.

       Definition at line 687 of file istream.tcc.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::seekg (off_type __off, ios_base::seekdir __dir)
       [inherited]
       Changing the current read position.

       Parameters
           __off A file offset object.
           __dir The direction in which to seek.

       Returns
           *this

       If fail() is not true, calls rdbuf()->pubseekoff(__off,__dir). If that function fails,
       sets failbit.

       Note
           This function first clears eofbit. It does not count the number of characters
           extracted, if any, and therefore does not affect the next call to gcount().

       Definition at line 892 of file istream.tcc.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::seekg (pos_type __pos) [inherited]
       Changing the current read position.

       Parameters
           __pos A file position object.

       Returns
           *this

       If fail() is not true, calls rdbuf()->pubseekpos(__pos). If that function fails, sets
       failbit.

       Note
           This function first clears eofbit. It does not count the number of characters
           extracted, if any, and therefore does not affect the next call to gcount().

       Definition at line 853 of file istream.tcc.

   template<typename _CharT , typename _Traits > int std::basic_istream< _CharT, _Traits >::sync
       [inherited]
       Synchronizing the stream buffer.

       Returns
           0 on success, -1 on failure

       If rdbuf() is a null pointer, returns -1.

       Otherwise, calls rdbuf()->pubsync(), and if that returns -1, sets badbit and returns -1.

       Otherwise, returns 0.

       Note
           This function does not count the number of characters extracted, if any, and therefore
           does not affect the next call to gcount().

       Definition at line 789 of file istream.tcc.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits >::pos_type
       std::basic_istream< _CharT, _Traits >::tellg [inherited]
       Getting the current read position.

       Returns
           A file position object.

       If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns
       rdbuf()->pubseekoff(0,cur,in).

       Note
           This function does not count the number of characters extracted, if any, and therefore
           does not affect the next call to gcount(). At variance with putback, unget and seekg,
           eofbit is not cleared first.

       Definition at line 825 of file istream.tcc.

   template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > &
       std::basic_istream< _CharT, _Traits >::unget [inherited]
       Unextracting the previous character.

       Returns
           *this

       If rdbuf() is not null, calls rdbuf()->sungetc(c).

       If rdbuf() is null or if sungetc() fails, sets badbit in the error state.

       Note
           This function first clears eofbit. Since no characters are extracted, the next call to
           gcount() will return 0, as required by DR 60.

       Definition at line 754 of file istream.tcc.

       Referenced by std::__detail::operator>>().

Member Data Documentation

   template<typename _CharT , typename _Traits > streamsize std::basic_istream< _CharT, _Traits
       >::_M_gcount [protected],  [inherited]
       The number of characters extracted in the previous unformatted function; see gcount().

       Definition at line 82 of file istream.

       Referenced by std::basic_istream< char >::get(), std::basic_istream< char >::getline(),
       std::basic_istream< char >::ignore(), std::basic_istream< char >::peek(),
       std::basic_istream< char >::putback(), std::basic_istream< char >::read(),
       std::basic_istream< char >::readsome(), and std::basic_istream< char >::unget().

Author

       Generated automatically by Doxygen for libstdc++ from the source code.

libstdc++                                Mon Oct 24 2std::basic_ifstream< _CharT, _Traits >(3cxx)