110. istreambuf_iterator::equal not const

Section: 27.6.3 [istreambuf.iterator], 99 [istreambuf.iterator::equal] Status: TC1 Submitter: Nathan Myers Opened: 1998-10-15 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [istreambuf.iterator].

View all issues with TC1 status.

Discussion:

Member istreambuf_iterator<>::equal is not declared "const", yet [istreambuf.iterator::op==] says that operator==, which is const, calls it. This is contradictory.

Proposed resolution:

In 27.6.3 [istreambuf.iterator] and also in 99 [istreambuf.iterator::equal], replace:

bool equal(istreambuf_iterator& b);

with:

bool equal(const istreambuf_iterator& b) const;