fmihpc / dccrg

Distributed cartesian cell-refinable grid
GNU Lesser General Public License v3.0
10 stars 10 forks source link

Fix override_refines container iteration crash. #47

Open ursg opened 4 months ago

ursg commented 4 months ago

This is one of those "how did this ever work" crashes? Instead of iterating through a container while modifying it, use std::erase_if.

markusbattarbee commented 4 months ago

Same fix for line 9622?

ursg commented 4 months ago

Ah, good catch.

markusbattarbee commented 4 months ago

so would std::remove_if() work in order to not require C++20 as that isn't yet available on all our platforms?

lkotipal commented 4 months ago

Right, std::erase_if() should just be shorthand for erase-remove.