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: [patchlet] Re: <sstream> bug?



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.
> 

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