|
So the issue should be addressed in the standard – see my post to the C++ reflector below:
-------- Original Message -------- To: C++ libraries mailing list http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#596 ...besides "a+" and "a+b" the C++ table is also missing a row Howard, unless this is somehow implied somewhere else in the text Thanks Added LWG #596 tag to the Summary to indicate a dependency on a Library Working Group issue, lowered Priority to Trivial (since it's by design), and deferred until after the C++ committee has had a chance to review the issue.
Martin Sebor made changes - 23/Aug/07 10:20 PM
Martin Sebor made changes - 21/Jan/08 06:47 PM
LWG issue 596
Martin Sebor made changes - 18/Mar/08 04:23 PM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
30.3.1.1 The in and out Open Modes
Input (and output) file streams always have the in (or out) open mode flag set implicitly. An output file stream, for instance, knows that it is in output mode and you need not set the output mode explicitly. Instead of writing:
std::ofstream Str("out.txt", std::ios_base::out | std::ios_base::app);
you can simply say:
std::ofstream Str("out.txt", std::ios_base::app);
Bidirectional file streams, on the other hand, do not have the flag set implicitly. This is because a bidirectional stream does not have to be in both input and output mode in all cases. You might want to open a bidirectional stream for reading only or writing only. Bidirectional file streams therefore have no implicit input or output mode. You must always set a bidirectional file stream's open mode explicitly.