376. basic_streambuf semantics

Section: 30.8.2.4 [stringbuf.virtuals] Status: CD1 Submitter: Ray Lischner Opened: 2002-08-14 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [stringbuf.virtuals].

View all issues with CD1 status.

Discussion:

In Section 30.8.2.4 [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.