https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86734

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Mon Jul 30 17:13:05 2018
New Revision: 263074

URL: https://gcc.gnu.org/viewcvs?rev=263074&root=gcc&view=rev
Log:
PR libstdc++/86734 make reverse_iterator::operator-> more robust

Implement the proposed resolution from LWG 1052, which also resolves
DR 2118 by avoiding taking the address in the first place.

        PR libstdc++/86734
        * include/bits/stl_iterator.h (reverse_iterator::operator->): Call
        _S_to_pointer (LWG 1052, LWG 2118).
        (reverse_iterator::_S_to_pointer): Define overloaded helper functions.
        * testsuite/24_iterators/reverse_iterator/dr1052.cc: New test.
        * testsuite/24_iterators/reverse_iterator/dr2188.cc: New test.

Added:
    trunk/libstdc++-v3/testsuite/24_iterators/reverse_iterator/dr1052.cc
    trunk/libstdc++-v3/testsuite/24_iterators/reverse_iterator/dr2188.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/stl_iterator.h

Reply via email to