564. stringbuf seekpos underspecified

Section: 30.8.2.4 [stringbuf.virtuals] Status: C++11 Submitter: Martin Sebor Opened: 2006-02-23 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [stringbuf.virtuals].

View all issues with C++11 status.

Discussion:

The effects of the seekpos() member function of basic_stringbuf simply say that the function positions the input and/or output sequences but fail to spell out exactly how. This is in contrast to the detail in which seekoff() is described.

[ 2009-07 Frankfurt ]

Move to Ready.

Proposed resolution:

Change 27.7.1.3, p13 to read:

-13- Effects: Equivalent to seekoff(off_type(sp), ios_base::beg, which). Alters the stream position within the controlled sequences, if possible, to correspond to the stream position stored in sp (as described below).

[ Kona (2007): A pos_type is a position in a stream by definition, so there is no ambiguity as to what it means. Proposed Disposition: NAD ]

[ Post-Kona Martin adds: I'm afraid I disagree with the Kona '07 rationale for marking it NAD. The only text that describes precisely what it means to position the input or output sequence is in seekoff(). The seekpos() Effects clause is inadequate in comparison and the proposed resolution plugs the hole by specifying seekpos() in terms of seekoff(). ]