Re: [PATCH] libstdc++: Make equal and is_permutation short-circuit (LWG 3560)

2024-11-14 Thread Jonathan Wakely
On Thu, 14 Nov 2024 at 17:13, Jonathan Wakely wrote: > > We already implement short-circuiting for random access iterators, but > we also need to do so for ranges::equal and ranges::is_permutation when > given sized ranges that are not random access ranges (e.g. std::list). > > libstdc++-v3/Change

[PATCH] libstdc++: Make equal and is_permutation short-circuit (LWG 3560)

2024-11-14 Thread Jonathan Wakely
We already implement short-circuiting for random access iterators, but we also need to do so for ranges::equal and ranges::is_permutation when given sized ranges that are not random access ranges (e.g. std::list). libstdc++-v3/ChangeLog: * include/bits/ranges_algo.h (__is_permutation_fn::