]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Implement LWG 3664 changes to ranges::distance
authorPatrick Palka <ppalka@redhat.com>
Sat, 5 Oct 2024 17:48:06 +0000 (13:48 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 22 Oct 2024 01:38:40 +0000 (21:38 -0400)
commitf381a217e9b6c8276bb580a22d12445ed7a7dc8c
tree85ff17bc21cdf704db408ecd989d0e02af1467d8
parent07ee6874963d2f8a787ba48341a5392ee8b6ba56
libstdc++: Implement LWG 3664 changes to ranges::distance

libstdc++-v3/ChangeLog:

* include/bits/ranges_base.h (__distance_fn::operator()):
Adjust iterator/sentinel overloads as per LWG 3664.
* testsuite/24_iterators/range_operations/distance.cc:
Test LWG 3664 example.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
(cherry picked from commit 7c0d1e9f2a2f1d41d9eb755c36c871d92638c4b7)
libstdc++-v3/include/bits/ranges_base.h
libstdc++-v3/testsuite/24_iterators/range_operations/distance.cc