Section: 18.104.22.168 [stringbuf.virtuals] Status: TC1 Submitter: Dietmar Kühl Opened: 1999-07-20 Last modified: 2016-01-28 10:19:27 UTC
Priority: Not Prioritized
View other active issues in [stringbuf.virtuals].
View all other issues in [stringbuf.virtuals].
View all issues with TC1 status.
Paragraph 8, Notes, of this section seems to mandate an extremely inefficient way of buffer handling for basic_stringbuf, especially in view of the restriction that basic_ostream member functions are not allowed to use xsputn() (see 22.214.171.124 [ostream]): For each character to be inserted, a new buffer is to be created.
Of course, the resolution below requires some handling of simultaneous input and output since it is no longer possible to update egptr() whenever epptr() is changed. A possible solution is to handle this in underflow().
In 126.96.36.199 [stringbuf.virtuals] paragraph 8, Notes, insert the words "at least" as in the following:
To make a write position available, the function reallocates (or initially allocates) an array object with a sufficient number of elements to hold the current array object (if any), plus at least one additional write position.