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

Nathan Myers ncm-nospam@cantrip.org
Sat Mar 8 03:11:00 GMT 2003


On Fri, Mar 07, 2003 at 05:55:46PM -0700, Martin Sebor wrote:
> Nathan Myers wrote:
> 
> 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?

See, Paolo, I really was smoking crack.

But, I wonder... maybe we should have a loop whose body calls
sputn() if there's room in the buffer, and overflow() if not.
Each call to overflow() might make room in the buffer so that
on the next round it can call sputn().

I'm probably still on something.

Nathan Myers
ncm-nospam@cantrip.org



More information about the Libstdc++ mailing list