Bind to std::equal plumbing in ranges::equal
François Dumont
frs.dumont@gmail.com
Fri Mar 6 06:03:00 GMT 2020
I started to work on ranges::equal to find out if what I am trying to do
is totally silly.
With this patch ranges::equal is in pare with std::equal specializations
that is to say that it correctly deals with Debug mode or std::deque
iterators.
Once below patch is in:
https://gcc.gnu.org/ml/libstdc++/2019-12/msg00032.html
We will even be able to call std::__equal_aux1 directly using
__niter_base to get rid of the Debug safe iterator layer. And even in
this case get rid of the branch __use_memcmp and leave it to __equal_aux1.
In addition to testsuite I checked running gdb that it does the right thing.
Ok to commit ?
libstdc++ Leverage on std::equal plumbing in ranges::equal.
Benefit from the std::equal plumbing to correctly deal with
_GLIBCXX_DEBUG mode and std::deque iterators.
* include/bits/ranges_algobase.h (__equal_fn::operator()):
Review conditions to call std::__equal_aux.
* testsuite/25_algorithms/equal/constrained.cc (test04): New.
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: range_equal.patch
Type: text/x-patch
Size: 2587 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20200306/408cc2ce/attachment.bin>
More information about the Libstdc++
mailing list