Closed revorm closed 1 year ago
What is the problem when resolving the call? An iterator is convertible to a const_iterator.
For some reason, GCC 11 is unable to resolve if it should call the const_iterator or key_type overload of flat_tree::erase.
It seems like something in my work codebase is triggering this in GCC since it doesn't break with a simple reproducer. It seems, however, that in the specific case of erase_unique we always expect to call the const_iterator overload of erase.
Unfortunately I am not able to produce a simplified reproducer so if you feel like that's insufficient evidence of an issue on your end then feel free to close the issue.
Thanks for the report.
Thanks for the fix!
In flat_tree.hpp on line 1132, erase_unique needs to get a const_iterator from its call to find, otherwise you can run in to trouble resolving the call to erase.