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

2025-07-06 Thread Jonathan Wakely
On Sun, 6 Jul 2025 at 19:53, Stephan Bergmann wrote: > > On 6/12/25 10:46, Jonathan Wakely wrote: > > It now says: > > > > I also had to reorder the __attribute__((always_inline)) and > > [[nodiscard]] attributes on the pre-c++20 operators, because Clang won't > > allow [[foo]] after _

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

2025-07-06 Thread Stephan Bergmann
On 6/12/25 10:46, Jonathan Wakely wrote: It now says: I also had to reorder the __attribute__((always_inline)) and [[nodiscard]] attributes on the pre-c++20 operators, because Clang won't allow [[foo]] after __attribute__((bar)) on a friend function: :4:36: error: an attribute l

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

2025-07-02 Thread Jonathan Wakely
On Wed, 2 Jul 2025 at 18:03, Patrick Palka wrote: > > On Wed, 2 Jul 2025, Jonathan Wakely wrote: > > > On Wed, 2 Jul 2025 at 15:29, Patrick Palka wrote: > > > > > > > > > On Wed, 11 Jun 2025, Jonathan Wakely wrote: > > > > > > > As suggested by Jason, this makes all __normal_iterator operators in

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

2025-07-02 Thread Patrick Palka
On Wed, 2 Jul 2025, Jonathan Wakely wrote: > On Wed, 2 Jul 2025 at 15:29, Patrick Palka wrote: > > > > > > On Wed, 11 Jun 2025, 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 se

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

2025-07-02 Thread Jonathan Wakely
On Wed, 2 Jul 2025 at 15:29, Patrick Palka wrote: > > > On Wed, 11 Jun 2025, 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. > > > > The operator<

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

2025-07-02 Thread Patrick Palka
On Wed, 11 Jun 2025, 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. > > The operator<=> comparing two iterators of the same type is removed > entirely

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

2025-06-12 Thread Jonathan Wakely
On Thu, 12 Jun 2025 at 09:34, Daniel Krügler wrote: > > Am Do., 12. Juni 2025 um 10:22 Uhr schrieb Jonathan Wakely > : >> >> On Thu, 12 Jun 2025 at 09:21, Jonathan Wakely wrote: >> > >> > On Thu, 12 Jun 2025 at 08:12, Daniel Krügler >> > wrote: >> > > >> > > Am Do., 12. Juni 2025 um 00:10 Uhr

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

2025-06-12 Thread Daniel Krügler
Am Do., 12. Juni 2025 um 10:22 Uhr schrieb Jonathan Wakely < jwak...@redhat.com>: > On Thu, 12 Jun 2025 at 09:21, Jonathan Wakely wrote: > > > > On Thu, 12 Jun 2025 at 08:12, Daniel Krügler > wrote: > > > > > > Am Do., 12. Juni 2025 um 00:10 Uhr schrieb Jonathan Wakely < > jwak...@redhat.com>: >

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

2025-06-12 Thread Jonathan Wakely
On Thu, 12 Jun 2025 at 09:21, Jonathan Wakely wrote: > > On Thu, 12 Jun 2025 at 08:12, Daniel Krügler > wrote: > > > > Am Do., 12. Juni 2025 um 00:10 Uhr schrieb Jonathan Wakely > > : > >> > >> As suggested by Jason, this makes all __normal_iterator operators into > >> friends so they can be fo

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

2025-06-12 Thread Jonathan Wakely
On Thu, 12 Jun 2025 at 08:12, Daniel Krügler wrote: > > Am Do., 12. Juni 2025 um 00:10 Uhr schrieb 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. >>

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

2025-06-12 Thread Daniel Krügler
Am Do., 12. Juni 2025 um 00:10 Uhr schrieb Jonathan Wakely < jwak...@redhat.com>: > 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. > > The operator<=> comparing two iterators of