This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


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

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



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

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