libstdc++/27: 'mode' argument in fstream/ofstream constructor

arysin@yahoo.com arysin@yahoo.com
Fri Jan 21 16:37:00 GMT 2000


>Number:         27
>Category:       libstdc++
>Synopsis:       'mode' argument in fstream/ofstream constructor
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 21 16:37:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     arysin@yahoo.com
>Release:        7
>Organization:
>Environment:
any
>Description:
When using 'mode' argument in ofstream
e.g. ofstream f("tm", ios::bin);
mode bit 'ios::out' gets cleaned so you have to type
ofstream f("tm", ios::out|ios::bin);

The same problem with ifstream.
>How-To-Repeat:

>Fix:
place 
 'mode |= ios::in;' in ifstream::ifstream(...)
and
 'mode |= ios::out;' in ofstream::ofstream(...)
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Libstdc++-prs mailing list