[bug] istream::getline(char*,streamsize) still broken

Benjamin Kosnik bkoz@redhat.com
Thu Jul 20 18:48:00 GMT 2000


Sorry about the delay.....

Ummmmm. Have you tried this recently?

[snip]
  const std::streamsize it = 5;
  assert( eifs.getline(tmp,it) ); // use eifs.getline(...); eifs.fail() 
  assert( eifs.gcount() == it );  // no, it - 1 max possible to extract

characters are no longer extracted and stored after n - 1, so gcount()
over it - 1 (4) would be incorrect.

-benjamin


More information about the Libstdc++ mailing list