Section: 220.127.116.11.5 [reverse.iter.opref] Status: C++14 Submitter: Alisdair Meredith Opened: 2012-09-23 Last modified: 2016-02-10
View all other issues in [reverse.iter.opref].
View all issues with C++14 status.
The specification for reverse_iterator::operator-> returns the address of the object yielded by dereferencing with operator*, but does not have the usual wording about returning the true address of the object. As reverse_iterator requires the adapted iterator have at least the bidirectional iterator category, we know that the returned reference is a true reference, and not a proxy, hence we can use std::addressof on the reference to get the right answer.
This will most likely show itself as an issue with a list or vector of a type with such an overloaded operator, where algorithms are likely to work with a forward iteration, but not with reverse iteration.
Resolution: Goes to open now and move to review as soon as Daniel proposes a new wording.
[2014-02-12 Issaquah meeting]
Use std::addressof as the library uses elsewhere, then move as Immediate.
Revise 18.104.22.168.5 [reverse.iter.opref] p1, as indicated: