Improve _GLIBCXX_DEBUG safe iterator range size computation.
authorFrançois Dumont <fdumont@gcc.gnu.org>
Fri, 4 Oct 2019 20:22:11 +0000 (20:22 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Fri, 4 Oct 2019 20:22:11 +0000 (20:22 +0000)
commit36edf9cab1d4a444497c2aaf57c4ce61f7a67901
treea88be7904712db89fc6c702cc4caf00bb41b371d
parent9af0d5ef3b14a9b3e4b0cb6aaaaba44ea722fb06
Improve _GLIBCXX_DEBUG safe iterator range size computation.

* include/debug/forward_list
(_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign
distance when not empty.
* include/debug/list (_Sequence_traits<__debug::list<>>::_S_size):
Likewise.
* include/debug/helper_functions.h (__dp_sign_max_size): New
_Distance_precision enum entry.
(__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type,
__false_type)): Adapt.
* include/debug/safe_iterator.tcc
(_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review
distance computation.

From-SVN: r276600
libstdc++-v3/ChangeLog
libstdc++-v3/include/debug/forward_list
libstdc++-v3/include/debug/helper_functions.h
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/safe_iterator.tcc