diff options
author | François Dumont <fdumont@gcc.gnu.org> | 2024-02-20 19:24:47 +0100 |
---|---|---|
committer | François Dumont <fdumont@gcc.gnu.org> | 2024-02-20 22:40:11 +0100 |
commit | ca5f509903315a56b2f306f8644544861a6525cb (patch) | |
tree | d8bec7c87b452f77a6527f2d7168a6076f54beef /libcpp | |
parent | 14ba8d5b87acd5f91ab8b8c02165a0fd53dcc2f2 (diff) | |
download | gcc-ca5f509903315a56b2f306f8644544861a6525cb.zip gcc-ca5f509903315a56b2f306f8644544861a6525cb.tar.gz gcc-ca5f509903315a56b2f306f8644544861a6525cb.tar.bz2 |
libstdc++: [_GLIBCXX_DEBUG] Fix std::__niter_wrap behavior
In _GLIBCXX_DEBUG mode the std::__niter_base can remove 2 layers, the
__gnu_debug::_Safe_iterator<> and the __gnu_cxx::__normal_iterator<>.
When std::__niter_wrap is called to build a __gnu_debug::_Safe_iterator<>
from a __gnu_cxx::__normal_iterator<> we then have a consistency issue
as the difference between the 2 iterators will done on a __normal_iterator
on one side and a C pointer on the other. To avoid this problem call
std::__niter_base on both input iterators.
libstdc++-v3/ChangeLog:
* include/bits/stl_algobase.h (std::__niter_wrap): Add a call to
std::__niter_base on res iterator.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions