Re: [PATCH] libstdc++: Avoid using std::__to_address with iterators

2024-10-22 Thread Jonathan Wakely
On Tue, 22 Oct 2024 at 18:43, Patrick Palka wrote: > > On Fri, 18 Oct 2024, Jonathan Wakely wrote: > > > Do others agree with my reasoning below? > > > > The changes to implement the rule "use std::__niter_base before C++20 > > and use std::to_address after C++20" were easier than I expected. Ther

Re: [PATCH] libstdc++: Avoid using std::__to_address with iterators

2024-10-22 Thread Patrick Palka
On Fri, 18 Oct 2024, Jonathan Wakely wrote: > Do others agree with my reasoning below? > > The changes to implement the rule "use std::__niter_base before C++20 > and use std::to_address after C++20" were easier than I expected. There > weren't many places that were doing it "wrong" and needed to

Re: [PATCH] libstdc++: Avoid using std::__to_address with iterators

2024-10-21 Thread Jonathan Wakely
On Mon, 21 Oct 2024 at 18:02, François Dumont wrote: > > Reasoning is perfectly fine to me. > > It's not a good news for me cause I plan to extend usages of > __niter_base to many algos to limit impact of _GLIBCXX_DEBUG mode at > runtime. If we have random access iterator we can be sure that > __g

Re: [PATCH] libstdc++: Avoid using std::__to_address with iterators

2024-10-21 Thread François Dumont
Reasoning is perfectly fine to me. It's not a good news for me cause I plan to extend usages of __niter_base to many algos to limit impact of _GLIBCXX_DEBUG mode at runtime. If we have random access iterator we can be sure that __glibcxx_requires_valid_range fully validated the range and so we