Title
Ambiguity in specification of gbump
Status
tc1
Section
[streambuf.get.area]
Submitter
Matt Austern

Created on 1998-07-28.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change [streambuf.get.area] paragraph 4 gbump effects from:

Effects: Advances the next pointer for the input sequence by n.

to:

Effects: Adds n to the next pointer for the input sequence.

Make the same change to [streambuf.put.area] paragraph 4 pbump effects.

Date: 1998-07-28.00:00:00

27.5.2.3.1 says that basic_streambuf::gbump() "Advances the next pointer for the input sequence by n."

The straightforward interpretation is that it is just gptr() += n. An alternative interpretation, though, is that it behaves as if it calls sbumpc n times. (The issue, of course, is whether it might ever call underflow.) There is a similar ambiguity in the case of pbump.

(The "classic" AT&T implementation used the former interpretation.)

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg136
1998-07-28 00:00:00admincreate