This is the mail archive of the libstdc++@gcc.gnu.org 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]
Other format: [Raw text]

Re: libstdc++/9424: i/ostream::operator>>/<<(streambuf*) drops characters


Nathan Myers wrote:
...

__xtrct = __charsread = 0; while (true) { int_type __c = __sbin->sbumpc(); if (_Traits::eq_int_type(__c ), _Traits_type::eof()) break; ++__charsread; __c = __sbout->sputc(__c); if (_Traits::eq_int_type(__c, _Traits_type::eof())) break;

I might be missing some context, so please forgive me if I'm off base, but wouldn't 27.6.2.5.3, p7, bullet 2 seem to preclude this implementation since the character must not be extracted if the insertion fails?

Regards
Martin


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