Title
strstreambuf refers to nonexistent member of fpos, fpos::offset
Status
new
Section
[depr.strstreambuf.virtuals]
Submitter
Billy O'Neal III

Created on 2018-04-04.00:00:00, last changed 2018-06-19.05:49:11.

Messages

Date: 2018-06-19.05:49:11

Proposed resolution:

This wording is relative to N4727.

  1. Edit [depr.strstreambuf.virtuals] as indicated:

    pos_type seekpos(pos_type sp, ios_base::openmode which
                     = ios_base::in | ios_base::out) override;
    

    -17- Effects: […]

    -18- For a sequence to be positioned, if its next pointer is a null pointer, the positioning operation fails. Otherwise, the function determines newoff from static_cast<off_type>(sp).offset():

    […]

Date: 2018-06-18.00:00:00

[ 2018-06-18 after reflector discussion ]

Priority set to 4

Date: 2018-04-04.00:00:00

strstreambuf refers to a nonexistent member function of fpos in the specification of the member function seekpos, [depr.strstreambuf.virtuals]/18 (emphasize mine):

For a sequence to be positioned, if its next pointer is a null pointer, the positioning operation fails. Otherwise, the function determines newoff from sp.offset():

The intent is clearly to get the corresponding streamoff from the fpos, as p19 says "the resultant offset newoff (of type off_type)". The mechanism to make that conversion is a normal explicit conversion, as indicated in the last row of the table in [fpos.operations].

History
Date User Action Args
2018-06-19 05:49:11adminsetmessages: + msg9904
2018-04-08 14:50:08adminsetmessages: + msg9775
2018-04-04 00:00:00admincreate