[patchlet] Re: <sstream> bug?

Benjamin Kosnik bkoz@redhat.com
Mon Jul 24 10:31:00 GMT 2000


Yeah. I suggest you read the reflector messages about this behavior, as 
there has been a buch of discussion about it.

Improving consistency is nice.

Umm. .... anyway. This patch is in, but a couple of things:

1) please use GNU coding style

while ()
{
}

not

while() {
}

and if ()
{
}

not if() {
}

2) looks like some breakage in istream_unformatted still. I'll try to 
scope it today but if you get a chance before I do I'd welcome patches.

-benjamin


On Mon, 24 Jul 2000, brent verner wrote:
> 
> 1) setting failbit in the sentry ctor causes the following to break,
>      istream_obj >> std::ws;
>    since sentry ctor would indiscriminately set failbit whenever it
>    hits EOF on the input stream. the definition of std::ws says
>    it must set eofbit, when EOF is read, but not failbit if a whitespace
>    character was extracted by the input operation.
> 
> 2) setting eofbit anytime EOF is seen in the sentry ctor causes 
>    istream arithmetic extractors to not behave consistently with
>    char/string extractors, since only eofbit is set when EOF is
>    hit, while the input operation spec says failbit should also
>    be set.
> 


More information about the Libstdc++ mailing list