libstdc++: [_GLIBCXX_DEBUG] Fix std::__niter_base behavior
commit9739d7ebf05aefcdd85477900528d8bee69df215
authorFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 14 Feb 2024 05:59:12 +0000 (14 06:59 +0100)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Sat, 17 Feb 2024 14:08:01 +0000 (17 15:08 +0100)
tree8274f75060308fdb69ace83f5ae1aaa24769e202
parent76aac40f5ecbc9cfb3b8734d181599e1b5a24bdf
libstdc++: [_GLIBCXX_DEBUG] Fix std::__niter_base behavior

std::__niter_base is used in _GLIBCXX_DEBUG mode to remove _Safe_iterator<>
wrapper on random access iterators. But doing so it should also preserve original
behavior to remove __normal_iterator wrapper.

libstdc++-v3/ChangeLog:

* include/bits/stl_algobase.h (std::__niter_base): Redefine the overload
definitions for __gnu_debug::_Safe_iterator.
* include/debug/safe_iterator.tcc (std::__niter_base): Adapt declarations.
libstdc++-v3/include/bits/stl_algobase.h
libstdc++-v3/include/debug/safe_iterator.tcc