This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/10444: ifstream.peek() can remove a character fromthe input file stream
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, paolo at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, loren dot williams at lycos dot com
- Date: Sun, 20 Apr 2003 20:24:59 +0200
- Subject: Re: libstdc++/10444: ifstream.peek() can remove a character fromthe input file stream
Forgot to add: you can obtain the behavior you expected by default from
operator>>(char&) by using the noskipws flag/manipulator (e.g.,
#include <iomanip> ... infile >> noskipws >> c)
Paolo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10444