libstdc++ Two simplifications for lexicographical_compare
authorJonathan Wakely <jwakely@redhat.com>
Wed, 26 Feb 2020 15:19:44 +0000 (15:19 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 26 Feb 2020 15:19:44 +0000 (15:19 +0000)
commit113f0a639dbdd78048373a253ec64145ead7d29d
tree9aef310f7e7e4d1c7b6c58925926538e190b4e5b
parent8017d95c7f55b98bcee1caf0216fdfd7fd613849
libstdc++ Two simplifications for lexicographical_compare

* include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
variables in smaller scope and avoid calling ranges::distance when we
know they are pointers. Remove statically-unreachable use of
__builtin_unreachable().
* include/bits/stl_algobase.h (__lexicographical_compare::__lc):
Define inline.
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/ranges_algo.h
libstdc++-v3/include/bits/stl_algobase.h