Section: 22.214.171.124 [ios.members.static] Status: CD1 Submitter: Matt Austern Opened: 1998-06-21 Last modified: 2016-01-28 10:19:27 UTC
Priority: Not Prioritized
View all issues with CD1 status.
(1) 126.96.36.199 doesn't say what ios_base::sync_with_stdio(f) returns. Does it return f, or does it return the previous synchronization state? My guess is the latter, but the standard doesn't say so.
(2) 188.8.131.52 doesn't say what it means for streams to be synchronized with stdio. Again, of course, I can make some guesses. (And I'm unhappy about the performance implications of those guesses, but that's another matter.)
Change the following sentence in 184.108.40.206 [ios.members.static] returns clause from:
true if the standard iostream objects (27.3) are synchronized and otherwise returns false.
true if the previous state of the standard iostream objects (27.3) was synchronized and otherwise returns false.
Add the following immediately after 220.127.116.11 [ios.members.static], paragraph 2:
When a standard iostream object str is synchronized with a standard stdio stream f, the effect of inserting a character c byfputc(f, c);
is the same as the effect ofstr.rdbuf()->sputc(c);
for any sequence of characters; the effect of extracting a character c byc = fgetc(f);
is the same as the effect of:c = str.rdbuf()->sbumpc(c);
for any sequences of characters; and the effect of pushing back a character c byungetc(c, f);
is the same as the effect ofstr.rdbuf()->sputbackc(c);
for any sequence of characters. [Footnote: This implies that operations on a standard iostream object can be mixed arbitrarily with operations on the corresponding stdio stream. In practical terms, synchronization usually means that a standard iostream object and a standard stdio object share a buffer. --End Footnote]
[pre-Copenhagen: PJP and Matt contributed the definition of "synchronization"]
[post-Copenhagen: proposed resolution was revised slightly: text was added in the non-normative footnote to say that operations on the two streams can be mixed arbitrarily.]