libstdc++: Revert final/non-addressable changes to ranges CPOs
authorJonathan Wakely <jwakely@redhat.com>
Wed, 16 Jun 2021 11:34:52 +0000 (12:34 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 16 Jun 2021 13:31:04 +0000 (14:31 +0100)
commitb9e35ee6d64bc9f82b8fe641aa8ac12a9e259fe8
tree4f44fcf71f94347f8653faf5803b3a53336c75cf
parentdbfc149b639342a9555c60aa9ee787fb3d009316
libstdc++: Revert final/non-addressable changes to ranges CPOs

In r12-1489-g8b93548778a487f31f21e0c6afe7e0bde9711fc4 I made the
[range.access] CPO types final and non-addressable. Tim Song pointed out
this is wrong. Only the [range.iter.ops] functions should be final and
non-addressable. Revert the changes to the [range.access] objects.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/ranges_base.h (ranges::begin, ranges::end)
(ranges::cbegin, ranges::cend, ranges::rbeing, ranges::rend)
(ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
(ranges::empty, ranges::data, ranges::cdata): Remove final
keywords and deleted operator& overloads.
* testsuite/24_iterators/customization_points/iter_move.cc: Use
new is_customization_point_object function.
* testsuite/24_iterators/customization_points/iter_swap.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
Likewise.
* testsuite/std/ranges/access/begin.cc: Likewise.
* testsuite/std/ranges/access/cbegin.cc: Likewise.
* testsuite/std/ranges/access/cdata.cc: Likewise.
* testsuite/std/ranges/access/cend.cc: Likewise.
* testsuite/std/ranges/access/crbegin.cc: Likewise.
* testsuite/std/ranges/access/crend.cc: Likewise.
* testsuite/std/ranges/access/data.cc: Likewise.
* testsuite/std/ranges/access/empty.cc: Likewise.
* testsuite/std/ranges/access/end.cc: Likewise.
* testsuite/std/ranges/access/rbegin.cc: Likewise.
* testsuite/std/ranges/access/rend.cc: Likewise.
* testsuite/std/ranges/access/size.cc: Likewise.
* testsuite/std/ranges/access/ssize.cc: Likewise.
* testsuite/util/testsuite_iterators.h
(is_customization_point_object): New function.
18 files changed:
libstdc++-v3/include/bits/ranges_base.h
libstdc++-v3/testsuite/24_iterators/customization_points/iter_move.cc
libstdc++-v3/testsuite/24_iterators/customization_points/iter_swap.cc
libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc
libstdc++-v3/testsuite/std/ranges/access/begin.cc
libstdc++-v3/testsuite/std/ranges/access/cbegin.cc
libstdc++-v3/testsuite/std/ranges/access/cdata.cc
libstdc++-v3/testsuite/std/ranges/access/cend.cc
libstdc++-v3/testsuite/std/ranges/access/crbegin.cc
libstdc++-v3/testsuite/std/ranges/access/crend.cc
libstdc++-v3/testsuite/std/ranges/access/data.cc
libstdc++-v3/testsuite/std/ranges/access/empty.cc
libstdc++-v3/testsuite/std/ranges/access/end.cc
libstdc++-v3/testsuite/std/ranges/access/rbegin.cc
libstdc++-v3/testsuite/std/ranges/access/rend.cc
libstdc++-v3/testsuite/std/ranges/access/size.cc
libstdc++-v3/testsuite/std/ranges/access/ssize.cc
libstdc++-v3/testsuite/util/testsuite_iterators.h