This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/846: stream types non-const members
- To: gcc-bugs at gcc dot gnu dot org, richarda at ixla dot com dot au
- Subject: Re: c++/846: stream types non-const members
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Sun, 26 Nov 2000 23:45:47 -0800
Richard, thanks for your bug report.
This is not a bug, but rather a strict interpretation of the
standard. It's been a source of some confusion, however, as others
have also reported it as a bug in the standard.
It's been assigned 'Not A Defect' status, for the following reason:
73. is_open should be const
Section: 27.8.1 lib.file.streams Status: NAD Submitter: Matt Austern
Date: 27 Aug 98
Classes basic_ifstream, basic_ofstream, and basic_fstream all have a
member function is_open. It should be a const member function, since
it does nothing but call one of basic_filebuf's const member
functions.
Rationale:
Not a defect. This is a deliberate feature; const streams would be
meaningless.