libstdc++: Constrain reverse_iterator and move_iterator conversions [LWG 3435]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 22 Jul 2020 12:25:11 +0000 (13:25 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 22 Jul 2020 14:10:29 +0000 (15:10 +0100)
commita5a8a4e61565a2a66391e29eb80813c581b7dc52
tree72a3145f8cb58041ff90f27c5546aa3a967bb19c
parent259c3965b1ba04f7ee022846af6173fb1c343bc8
libstdc++: Constrain reverse_iterator and move_iterator conversions [LWG 3435]

libstdc++-v3/ChangeLog:

* include/bits/stl_iterator.h (reverse_iterator): Constrain
converting constructor and converting assignment operator.
Access source iterator's data member directly instead of
calling base().
(move_iterator): Likewise.
* testsuite/24_iterators/move_iterator/dr3435.cc: New test.
* testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
libstdc++-v3/include/bits/stl_iterator.h
libstdc++-v3/testsuite/24_iterators/move_iterator/dr3435.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/reverse_iterator/dr3435.cc [new file with mode: 0644]