This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/10444: ifstream.peek() can remove a character from the input file stream


Synopsis: ifstream.peek() can remove a character from the input file stream

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Sun Apr 20 10:34:03 2003
Responsible-Changed-Why:
    Triaged.
State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Sun Apr 20 10:34:03 2003
State-Changed-Why:
    Not a bug. The problem is not with peek() but, honestly, 
    with your understanding of operator>>(char&): at variance
    with get(), it skips any initial whitespace before
    extracting the char. In fact, changing onegm.txt to:
    A_______0.0856
    B_______0.0139
    C_______0.0279
    leads to the behaviour that you expect.
    Thanks for your report, Paolo. 

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10444


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]