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

### 32. Pbackfail description inconsistent

Section: 29.6.3.5.4 [streambuf.virt.pback] Status: TC1 Submitter: Nathan Myers Opened: 1998-08-06 Last modified: 2016-01-28

Priority: Not Prioritized

View all issues with TC1 status.

Discussion:

The description of the required state before calling virtual member basic_streambuf<>::pbackfail requirements is inconsistent with the conditions described in 27.5.2.2.4 [lib.streambuf.pub.pback] where member sputbackc calls it. Specifically, the latter says it calls pbackfail if:

traits::eq(c,gptr()[-1]) is false

where pbackfail claims to require:

traits::eq(*gptr(),traits::to_char_type(c)) returns false

It appears that the pbackfail description is wrong.

Proposed resolution:

In 29.6.3.5.4 [streambuf.virt.pback], paragraph 1, change:

> "`traits::eq(*gptr(),traits::to_char_type( c))`"

to

> "`traits::eq(traits::to_char_type(c),gptr()[-1])`"

Rationale:

Note deliberate reordering of arguments for clarity in addition to the correction of the argument value.