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

### 2790. Missing specification of `istreambuf_iterator::operator->`

Section: 23.6.4 [istreambuf.iterator] Status: C++17 Submitter: Jonathan Wakely Opened: 2016-11-09 Last modified: 2017-07-30

Priority: 3

View other active issues in [istreambuf.iterator].

View all other issues in [istreambuf.iterator].

View all issues with C++17 status.

Discussion:

Addresses GB 59

There is no specification for `istreambuf_iterator::operator->`. This operator appears to have been added for C++11 by LWG issue 659, which gave the signature, but also lacked specification.

[2016-11-08, Jonathan comments and suggests wording]

There is no good option here, and implementations either return `nullptr`, or return the address of a temporary, or don't even provide the member at all. We took polls to decide whether to remove `istreambuf_iterator::operator->`, or specify it to return `nullptr`, and the preferred option was to remove it. It was noted that in the Ranges TS input iterators no longer require `operator->` anyway, and the library never tries to use it.

[Issues Telecon 16-Dec-2016]

Move to Review

Proposed resolution:

This wording is relative to N4606.

> This reverts LWG 659.

1. Remove the note in paragraph 1 of 23.6.4 [istreambuf.iterator]:

   > The class template `istreambuf_iterator` defines an input iterator (24.2.3) that reads successive characters from the streambuf for which it was constructed. `operator*` provides access to the current input character, if any. [Note: `operator->` may return a proxy. — end note] Each time `operator++` is evaluated, the iterator advances to the next input character. […]

2. Remove the member from the class synopsis in 23.6.4 [istreambuf.iterator]:

   >     charT operator*() const;
   >     pointer operator->() const;
   >     istreambuf_iterator& operator++();
   >     proxy operator++(int);