Title
Missing specification of istreambuf_iterator::operator->
Status
c++17
Section
[istreambuf.iterator]
Submitter
Jonathan Wakely

Created on 2016-11-09.00:00:00 last changed 89 months ago

Messages

Date: 2016-12-16.20:56:38

Proposed resolution:

This wording is relative to N4606.

This reverts LWG 659.

  1. Remove the note in paragraph 1 of [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 [istreambuf.iterator]:

    charT operator*() const;
    pointer operator->() const;
    istreambuf_iterator& operator++();
    proxy operator++(int);
    
Date: 2017-02-02.00:41:18

[ Issues Telecon 16-Dec-2016 ]

Move to Review

Date: 2016-11-15.00:00:00

[ 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.

Date: 2016-11-09.00:00:00

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.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2017-03-05 23:41:16adminsetstatus: review -> wp
2016-12-16 20:56:38adminsetmessages: + msg8722
2016-12-16 20:56:38adminsetstatus: new -> review
2016-11-09 19:14:03adminsetmessages: + msg8587
2016-11-09 19:14:03adminsetmessages: + msg8586
2016-11-09 00:00:00admincreate