On Wed, 19 Mar 2025 20:33:36 +0000
Jonathan Wakely <jwak...@redhat.com> wrote:

> There's no need to keep using std::find_if from the beginning of the
> container after every removal, just update the iterator after erasing
> an element.
> 
> This is how C++20 std::erase_if is implemented.\

LGTM.  I am gun-shy about using iterators while modifying containers.
I know there are rules.  :-/  

Likely you'll find other examples.  The arrays are small and the
performance impact is too, but neatness counts and simpler is better.  

Jonathan, if your patches to the FE so far are awaiting *my* approval,
consider it done.  I've read them and they're straightforward.  If I
need to do more than just say that, please direct me.  

--jkl

Reply via email to