This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/8349: std::ios_base::out is not present in the fstream constructor taking a single argument.
- From: paolo at gcc dot gnu dot org
- To: adamwilkshire at hotmail dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, paolo at gcc dot gnu dot org
- Date: 25 Oct 2002 21:01:47 -0000
- Subject: Re: libstdc++/8349: std::ios_base::out is not present in the fstream constructor taking a single argument.
- Reply-to: paolo at gcc dot gnu dot org, adamwilkshire at hotmail dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, paolo at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: std::ios_base::out is not present in the fstream constructor taking a single argument.
Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Fri Oct 25 14:01:46 2002
Responsible-Changed-Why:
Analyzed.
State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Fri Oct 25 14:01:46 2002
State-Changed-Why:
In fact, as prescribed by 27.8.1.11, ios_base::out *is*
present but together with ios_base::in, that is
ios_base::in | ios_base::out is the default open mode of an
fstream. However, the meaning of such an open mode is the
same of the "r+" mode in C (27.8.1.3, Table 92), that is
*file must exist*.
To the contrary, the open mode of ofstream is ios_base::out,
which creates if necessary (27.8.1.8).
Thanks for your report, Paolo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8349