Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-20 Thread Jonathan Wakely
On Tue, 20 Feb 2024 at 18:43, François Dumont wrote: > >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_wr

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-20 Thread François Dumont
   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<>     fro

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-19 Thread François Dumont
Turns out that 23_containers/vector/erasure.cc was showing the problem in _GLIBCXX_DEBUG mode. I had only run 25_algorithms tests in _GLIBCXX_DEBUG mode. This is what I'm testing, I 'll let you know tomorrow morning if all successful. Of course feel free to do or ask for a revert instead. F

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-19 Thread Jonathan Wakely
On Mon, 19 Feb 2024, 08:12 Jonathan Wakely, wrote: > > > On Mon, 19 Feb 2024, 07:08 Stephan Bergmann, wrote: > >> On 2/17/24 15:14, François Dumont wrote: >> > Thanks for the link, tested and committed. >> >> I assume this is the cause for the below failure now, >> > > Yes, the new >= C++11 over

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-19 Thread Jonathan Wakely
On Mon, 19 Feb 2024, 07:08 Stephan Bergmann, wrote: > On 2/17/24 15:14, François Dumont wrote: > > Thanks for the link, tested and committed. > > I assume this is the cause for the below failure now, > Yes, the new >= C++11 overload of __niter_base recursively unwraps multiple layers of wrapping

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-18 Thread Stephan Bergmann
On 2/17/24 15:14, François Dumont wrote: Thanks for the link, tested and committed. I assume this is the cause for the below failure now, $ cat test.cc #include #include void f(std::vector &v, void const * p) { std::erase(v, p); } $ ~/gcc/inst/bin/g++ -std=c++20 -D_GLIBCXX_DEBUG -fsy

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-17 Thread François Dumont
Thanks for the link, tested and committed. On 15/02/2024 19:40, Jonathan Wakely wrote: On Thu, 15 Feb 2024 at 18:38, François Dumont wrote: On 15/02/2024 14:17, Jonathan Wakely wrote: On Wed, 14 Feb 2024 at 21:48, François Dumont wrote: On 14/02/2024 20:44, Jonat

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-15 Thread Jonathan Wakely
On Thu, 15 Feb 2024 at 18:38, François Dumont wrote: > > On 15/02/2024 14:17, Jonathan Wakely wrote: > > > > On Wed, 14 Feb 2024 at 21:48, François Dumont > wrote: > >> >> On 14/02/2024 20:44, Jonathan Wakely wrote: >> >> >> >> On Wed, 14 Feb 2024 at 18:39, François Dumont >> wrote: >> >>> libs

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-15 Thread François Dumont
On 15/02/2024 14:17, Jonathan Wakely wrote: On Wed, 14 Feb 2024 at 21:48, François Dumont wrote: On 14/02/2024 20:44, Jonathan Wakely wrote: On Wed, 14 Feb 2024 at 18:39, François Dumont wrote: libstdc++: [_GLIBCXX_DEBUG] Fix std::__niter_base behavior st

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-15 Thread Jonathan Wakely
On Wed, 14 Feb 2024 at 21:48, François Dumont wrote: > > On 14/02/2024 20:44, Jonathan Wakely wrote: > > > > On Wed, 14 Feb 2024 at 18:39, François Dumont > wrote: > >> libstdc++: [_GLIBCXX_DEBUG] Fix std::__niter_base behavior >> >> std::__niter_base is used in _GLIBCXX_DEBUG mode to remove >>

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-14 Thread François Dumont
On 14/02/2024 20:44, Jonathan Wakely wrote: On Wed, 14 Feb 2024 at 18:39, François Dumont wrote: 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 d

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-14 Thread Jonathan Wakely
On Wed, 14 Feb 2024 at 18:39, François Dumont wrote: > 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 rem

[PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-14 Thread François Dumont
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:     *