This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

### 3095. `strstreambuf` refers to nonexistent member of `fpos`, `fpos::offset`

Section: D.12.2.4 [depr.strstreambuf.virtuals] Status: New Submitter: Billy O'Neal III Opened: 2018-04-04 Last modified: 2020-09-06

Priority: 4

View all other issues in [depr.strstreambuf.virtuals].

View all issues with New status.

Discussion:

`strstreambuf` refers to a nonexistent member function of `fpos` in the specification of the member function `seekpos`, D.12.2.4 [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].

[2018-06-18 after reflector discussion]

Priority set to 4

Proposed resolution:

This wording is relative to N4727.

1. Edit D.12.2.4 [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()`:

   > > […]