Re: [PATCH v3] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-20 Thread Tomasz Kaminski
On Tue, May 20, 2025 at 3:17 PM Tomasz Kaminski wrote: > > > On Tue, May 20, 2025 at 3:07 PM Patrick Palka wrote: > >> On Tue, 20 May 2025, Tomasz Kaminski wrote: >> >> > >> > >> > On Mon, May 19, 2025 at 6:06 PM Patrick Palka >> wrote: >> > On Mon, 19 May 2025, Patrick Palka wrote: >> >

Re: [PATCH v3] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-20 Thread Tomasz Kaminski
On Tue, May 20, 2025 at 3:07 PM Patrick Palka wrote: > On Tue, 20 May 2025, Tomasz Kaminski wrote: > > > > > > > On Mon, May 19, 2025 at 6:06 PM Patrick Palka wrote: > > On Mon, 19 May 2025, Patrick Palka wrote: > > > > > Changes in v3: > > > * Use the forward_range code path

Re: [PATCH v3] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-20 Thread Patrick Palka
On Tue, 20 May 2025, Tomasz Kaminski wrote: > > > On Mon, May 19, 2025 at 6:06 PM Patrick Palka wrote: > On Mon, 19 May 2025, Patrick Palka wrote: > > > Changes in v3: > >   * Use the forward_range code path for a (non-sized) bidirectional > >     haystack, since it's s

Re: [PATCH v3] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-20 Thread Tomasz Kaminski
On Mon, May 19, 2025 at 6:06 PM Patrick Palka wrote: > On Mon, 19 May 2025, Patrick Palka wrote: > > > Changes in v3: > > * Use the forward_range code path for a (non-sized) bidirectional > > haystack, since it's slightly fewer increments/decrements > > overall. > > * Fix wrong iter_d

Re: [PATCH v3] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-19 Thread Patrick Palka
On Mon, 19 May 2025, Patrick Palka wrote: > Changes in v3: > * Use the forward_range code path for a (non-sized) bidirectional > haystack, since it's slightly fewer increments/decrements > overall. > * Fix wrong iter_difference_t cast in starts_with. > > Changes in v2: > Addressed T

[PATCH v3] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-19 Thread Patrick Palka
Changes in v3: * Use the forward_range code path for a (non-sized) bidirectional haystack, since it's slightly fewer increments/decrements overall. * Fix wrong iter_difference_t cast in starts_with. Changes in v2: Addressed Tomasz's review comments, namely: * Added explicit iter_di