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

3128. strstream::rdbuf needs a const_cast

Section: D.8.5.3 [depr.strstream.oper] Status: WP Submitter: Tim Song Opened: 2018-06-30 Last modified: 2018-11-13

Priority: 0

View all issues with WP status.

Discussion:

strstream::rdbuf has the same issue with a missing const_cast on &sb.

Somewhat amusingly, istrstream::rdbuf and ostrstream::rdbuf got this right, but each with a different style (see issue 252).

[2018-07-20 Status to Tentatively Ready after five positive votes on the reflector.]

[2018-11, Adopted in San Diego]

Proposed resolution:

This wording is relative to N4750.

  1. Change D.8.5.3 [depr.strstream.oper] p1 as indicated:

    strstreambuf* rdbuf() const;
    

    -1- Returns: const_cast<strstreambuf*>(&sb).