This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: basic_ios::fail() question
- To: kabatek@Chemie.UNI-Halle.DE
- Subject: Re: basic_ios::fail() question
- From: Benjamin Kosnik <bkoz@cygnus.com>
- Date: Fri, 22 Jan 1999 11:45:13 -0800 (pst)
- cc: libstdc++-v3@cygnus.com
Yup. You're right, according to the standard as well. (27.4.4.3 p 8). Just
send me the patch and I'll put it in.
Thanks,
Benjamin
On Fri, 22 Jan 1999, Ryszard Kabatek wrote:
>
> The basic_ios::fail() member function returns true if the eofbit
> or the failbit is set. ------
>
> bool fail () const { return (rdstate () & (eofbit | failbit)) != 0; }
>
> Why the eofbit? I would expect the badbit instead.
> ------
> bool fail () const { return (rdstate () & (badbit | failbit)) != 0; }
>
>
> Ryszard Kabatek
> Martin-Luther University Halle-Wittenberg, Department of Physical Chemistry
> Geusaer Str. 88, 06217 Merseburg, Germany
> Tel. +49 3461 46 2487 Fax. +49 3461 46 2129
>
>