libstdc++: Implement remaining piece of LWG 3448
authorPatrick Palka <ppalka@redhat.com>
Thu, 27 Aug 2020 01:51:48 +0000 (21:51 -0400)
committerPatrick Palka <ppalka@redhat.com>
Thu, 27 Aug 2020 01:53:04 +0000 (21:53 -0400)
commit3ae0cd94abc15e33dc06ca7a5f76f14b1d74129f
tree1121fa585c1da2b5f06a7f1bdb976d25c0c9423c
parent4be16d1c1cfa6d151d2853ce509c1a797189c9ad
libstdc++: Implement remaining piece of LWG 3448

Almost all of the proposed resolution for LWG 3448 is already
implemented; the only part left is to adjust the return type of
transform_view::sentinel::operator-.

libstdc++-v3/ChangeLog:

PR libstdc++/95322
* include/std/ranges (transform_view::sentinel::__distance_from):
Give this a deduced return type.
(transform_view::sentinel::operator-): Adjust the return type so
that it's based on the constness of the iterator rather than
that of the sentinel.
* testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc