Created on 2019-02-21.00:00:00 last changed 61 months ago
Proposed resolution:
This wording is relative to N4800.
Change class template istreambuf_iterator synopsis, [istreambuf.iterator], as indicated:
template<class charT, class traits = char_traits<charT>> class istreambuf_iterator { public: using iterator_category = input_iterator_tag; using value_type = charT; using difference_type = typename traits::off_type; using pointer = voidunspecified; using reference = charT; […] };
[ 2019-10-30, Jonathan comments ]
Also, reverse_iterator::operator->() is now constrained and so not always defined, but reverse_iterator::pointer is defined unconditionally.
[ 2019-03-05, Daniel comments ]
With the acceptance of P1252R2 the committee decided to deprecate operator-> of move_iterator, interestingly without mentioning what should happen with its current pointer typedef (which is equal to the template parameter Iterator and thus never void). Effectively this is a very similar situation as for the here discussed istreambuf_iterator case and it seems attractive to me to solve both cases similarly.
[ 2019-03-05 Priority set to 3 after reflector discussion ]
[ 2019-03-03, Daniel provides concrete wording ]
The current working paper requires iterator_traits<Iter>::pointer to be void if Iter doesn't define operator-> ([iterator.traits]). We recently removed operator-> from istreambuf_iterator via LWG 2790, therefore either its pointer member should be void, or there should be a partial specialization of iterator_traits. Do we want to change unspecified to void in the class synopsis in [istreambuf.iterator]?
History | |||
---|---|---|---|
Date | User | Action | Args |
2019-10-30 17:35:10 | admin | set | messages: + msg10710 |
2019-03-05 22:28:07 | admin | set | messages: + msg10345 |
2019-03-05 18:54:44 | admin | set | messages: + msg10340 |
2019-03-03 16:32:51 | admin | set | messages: + msg10330 |
2019-03-03 16:32:51 | admin | set | messages: + msg10329 |
2019-02-21 00:00:00 | admin | create |