This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: [patchlet] Re: <sstream> bug?
- To: brent verner <brent at rcfile dot org>
- Subject: Re: [patchlet] Re: <sstream> bug?
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Mon, 24 Jul 2000 10:31:17 -0700 (PDT)
- cc: stdc++ <libstdc++ at sourceware dot cygnus dot com>
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.
>