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

567. streambuf inserter and extractor should be unformatted

Section: 31.7 [iostream.format] Status: CD1 Submitter: Martin Sebor Opened: 2006-02-25 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [iostream.format].

View all issues with CD1 status.

Discussion:

Issue 60 explicitly made the extractor and inserter operators that take a basic_streambuf* argument formatted input and output functions, respectively. I believe that's wrong, certainly in the case of the extractor, since formatted functions begin by extracting and discarding whitespace. The extractor should not discard any characters.

Proposed resolution:

I propose to change each operator to behave as unformatted input and output function, respectively. The changes below are relative to the working draft document number N1804.

Specifically, change 27.6.1.2.3, p14 as follows:

Effects: Behaves as an unformatted input function (as described in 27.6.1.2.127.6.1.3, paragraph 1).

And change 27.6.2.5.3, p7 as follows:

Effects: Behaves as an unformatted output function (as described in 27.6.2.5.127.6.2.6, paragraph 1).

[ Kona (2007): Proposed Disposition: Ready ]