Movatterモバイル変換


[0]ホーム

URL:



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

169. Bad efficiency ofoverflow() mandated

Section: 31.8.2.5[stringbuf.virtuals]Status:TC1Submitter: Dietmar KühlOpened: 1999-07-20Last modified: 2016-01-28

Priority:Not Prioritized

View otheractive issues in [stringbuf.virtuals].

View all otherissues in [stringbuf.virtuals].

View all issues withTC1 status.

Discussion:

Paragraph 8, Notes, of this section seems to mandate an extremelyinefficient way of buffer handling forbasic_stringbuf,especially in view of the restriction thatbasic_ostreammember functions are not allowed to usexsputn() (see 31.7.6.2[ostream]): For each character to be inserted, a new bufferis to be created.

Of course, the resolution below requires some handling ofsimultaneous input and output since it is no longer possible to updateegptr() wheneverepptr() is changed. A possiblesolution is to handle this inunderflow().

Proposed resolution:

In 31.8.2.5[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), plusat least one additional write position.


[8]ページ先頭

©2009-2026 Movatter.jp