In this code s failbit is set if last line in s is empty (stream ends with
\n\n):
std::istream s;
//s is some kind of input stream like std::istringstream s("\n\n");
while (s.good()) {
std::string line;
std::getline(s, line);
}
--
Summary: std::getline set failbit in situation when shouldn't
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: qwak82 at gmail dot com
GCC host triplet: ubuntu linux x86-64
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44441