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.

376. basic_streambuf semantics

Section: 31.8.2.5 [stringbuf.virtuals] Status: CD1 Submitter: Ray Lischner Opened: 2002-08-14 Last modified: 2016-01-28

Priority: Not Prioritized

View other active issues in [stringbuf.virtuals].

View all other issues in [stringbuf.virtuals].

View all issues with CD1 status.

Discussion:

In Section 31.8.2.5 [stringbuf.virtuals], Table 90, the implication is that the four conditions should be mutually exclusive, but they are not. The first two cases, as written, are subcases of the third.

As written, it is unclear what should be the result if cases 1 and 2 are both true, but case 3 is false.

Proposed resolution:

Rewrite these conditions as:

(which & (ios_base::in|ios_base::out)) == ios_base::in

(which & (ios_base::in|ios_base::out)) == ios_base::out

(which & (ios_base::in|ios_base::out)) == (ios_base::in|ios_base::out) and way == either ios_base::beg or ios_base::end

Otherwise

Rationale:

It's clear what we wanted to say, we just failed to say it. This fixes it.