Re: [PATCH] libstdc++: Use hidden friends for __normal_iterator operators

2024-12-02 Thread Patrick Palka
On Mon, 2 Dec 2024, Jonathan Wakely wrote: > On Mon, 2 Dec 2024 at 17:42, Patrick Palka wrote: > > > > On Mon, 2 Dec 2024, Patrick Palka wrote: > > > > > On Thu, 28 Nov 2024, Jonathan Wakely wrote: > > > > > > > As suggested by Jason, this makes all __normal_iterator operators into > > > > friend

Re: [PATCH] libstdc++: Use hidden friends for __normal_iterator operators

2024-12-02 Thread Patrick Palka
On Mon, 2 Dec 2024, Patrick Palka wrote: > On Thu, 28 Nov 2024, Jonathan Wakely wrote: > > > As suggested by Jason, this makes all __normal_iterator operators into > > friends so they can be found by ADL and don't need to be separately > > exported in module std. > > Might as well remove the __g

Re: [PATCH] libstdc++: Use hidden friends for __normal_iterator operators

2024-12-02 Thread Jonathan Wakely
On Mon, 2 Dec 2024 at 17:42, Patrick Palka wrote: > > On Mon, 2 Dec 2024, Patrick Palka wrote: > > > On Thu, 28 Nov 2024, Jonathan Wakely wrote: > > > > > As suggested by Jason, this makes all __normal_iterator operators into > > > friends so they can be found by ADL and don't need to be separatel

Re: [PATCH] libstdc++: Use hidden friends for __normal_iterator operators

2024-12-02 Thread Patrick Palka
On Thu, 28 Nov 2024, Jonathan Wakely wrote: > As suggested by Jason, this makes all __normal_iterator operators into > friends so they can be found by ADL and don't need to be separately > exported in module std. Might as well remove the __gnu_cxx exports in std.cc.in while we're at it? > > For

[PATCH] libstdc++: Use hidden friends for __normal_iterator operators

2024-11-28 Thread Jonathan Wakely
As suggested by Jason, this makes all __normal_iterator operators into friends so they can be found by ADL and don't need to be separately exported in module std. For the operator<=> comparing two iterators of the same type, I had to use a deduced return type and add a requires-clause, because it'