3a391adf7a
Make the memcmp optimization work for std::deque iterators and safe iterators. Co-authored-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: 2020-06-08 François Dumont <fdumont@gcc.gnu.org> Jonathan Wakely <jwakely@redhat.com> * include/bits/deque.tcc (__lex_cmp_dit): New. (__lexicographical_compare_aux1): Define overloads for deque iterators. * include/bits/stl_algobase.h (__lexicographical_compare::__3way): New static member function. (__lexicographical_compare<true>::__3way): Likewise. (__lexicographical_compare<true>::__lc): Use __3way. (__lexicographical_compare_aux): Rename to __lexicographical_compare_aux1 and declare overloads for deque iterators. (__lexicographical_compare_aux): Define new forwarding function that calls __lexicographical_compare_aux1 and declare new overloads for safe iterators. (lexicographical_compare): Do not use __niter_base on parameters. * include/debug/safe_iterator.tcc (__lexicographical_compare_aux): Define overloads for safe iterators. * testsuite/25_algorithms/lexicographical_compare/1.cc: Add checks with random access iterators. * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc: New test. |
||
---|---|---|
.. | ||
array | ||
assertions.h | ||
bitset | ||
debug.h | ||
deque | ||
formatter.h | ||
forward_list | ||
functions.h | ||
helper_functions.h | ||
list | ||
macros.h | ||
map | ||
map.h | ||
multimap.h | ||
multiset.h | ||
safe_base.h | ||
safe_container.h | ||
safe_iterator.h | ||
safe_iterator.tcc | ||
safe_local_iterator.h | ||
safe_local_iterator.tcc | ||
safe_sequence.h | ||
safe_sequence.tcc | ||
safe_unordered_base.h | ||
safe_unordered_container.h | ||
safe_unordered_container.tcc | ||
set | ||
set.h | ||
stl_iterator.h | ||
string | ||
unordered_map | ||
unordered_set | ||
vector |