This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/42600] New: istream.eof() returns wrong value after reading bool
- From: "d dot frey at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jan 2010 00:29:39 -0000
- Subject: [Bug libstdc++/42600] New: istream.eof() returns wrong value after reading bool
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code prints "true" with 4.3.3, but "false" with 4.4.2 and
4.5-20091231. I think printing "true" is correct or am I missing something?
#include <iostream>
#include <iomanip>
#include <sstream>
int main()
{
bool result;
std::istringstream is( "true" );
is >> std::boolalpha >> result;
std::cout << std::boolalpha << is.eof() << std::endl;
}
--
Summary: istream.eof() returns wrong value after reading bool
Product: gcc
Version: 4.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: d dot frey at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42600