Equivalence table between C++ and C file open modes
Paolo Carlini
pcarlini@suse.de
Fri Jun 8 19:55:00 GMT 2007
Martin Sebor wrote:
> There's also ios::app alone (soon to be added to issue 596) which
> traditionally translates to "a", and ios::app|ios::in which is
> equivalent to "a+". I think libstdc++ accepts both.
I know something is still in flux, I read your message on the reflector.
The table is just an adaptation of the existing Table 92 (+ the
mentioned addition), which is about basic_filebuf, not fstream or
something else. AFAIK, it reflects exactly the behavior which we are
implementing, or at least it should: in basic_file_stdio.cc, fopen_mode
returns zero, meaning error, if anything else is passed.
Paolo.
More information about the Libstdc++
mailing list