[Bug libstdc++/100768] Range iterator operations should be function objects
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 3 14:57:55 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100768
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:e01562b302eae3d415b43a4efe7ce52cff3e0063
commit r10-9886-ge01562b302eae3d415b43a4efe7ce52cff3e0063
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed May 26 17:32:53 2021 +0100
libstdc++: Change [range.iter.op] functions to function objects [PR 100768]
The standard specifies std::ranges::distance etc as function templates,
but it also requires them to not be found by ADL, and to suppress ADL
when normal unqualified lookup does find them. That means they need to
be function objects.
libstdc++-v3/ChangeLog:
PR libstdc++/100768
* include/bits/range_access.h (ranges::advance)
(ranges::distance, ranges::next, ranges::prev): Replace
function templates with function objects.
* testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
Adjust for changes to function objects.
* testsuite/std/ranges/adaptors/elements.cc: Add using
declarations for names from namespace ranges.
* testsuite/std/ranges/adaptors/transform.cc: Likewise.
* testsuite/24_iterators/range_operations/100768.cc: New test.
(cherry picked from commit a49a045b92f982f5617c3bbde97a33157237e25b)
More information about the Gcc-bugs
mailing list