Title
strstream::rdbuf needs a const_cast
Status
c++20
Section
[depr.strstream.oper]
Submitter
Tim Song

Created on 2018-06-30.00:00:00 last changed 45 months ago

Messages

Date: 2018-11-12.04:39:29

Proposed resolution:

This wording is relative to N4750.

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

    strstreambuf* rdbuf() const;
    

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

Date: 2018-11-12.04:39:29

[ 2018-11, Adopted in San Diego ]

Date: 2018-07-20.00:00:00

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

Date: 2018-06-30.00:00:00

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).

History
Date User Action Args
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2018-11-12 04:39:29adminsetmessages: + msg10197
2018-11-12 04:39:29adminsetstatus: voting -> wp
2018-10-08 05:13:59adminsetstatus: ready -> voting
2018-07-20 21:06:57adminsetmessages: + msg10035
2018-07-20 21:06:57adminsetstatus: new -> ready
2018-06-30 06:01:39adminsetmessages: + msg10000
2018-06-30 00:00:00admincreate