[LLVMdev] SmallPtrSet Iterator Behavior
sabre at nondot.org
Tue Dec 4 14:39:35 PST 2007
On Tue, 4 Dec 2007, David Greene wrote:
>> Right, deleting an element will invalidate any iterators past it, just
>> like a vector. I don't know of a good solution to this that doesn't break
>> the efficiency properties of smallset. Do you?
> What I've done is code up a version of erase() that returns an iterator
> to the next element. There still seem to be some problems that I'm
> looking into. This interface has the side benefit of being standard-library
> compatible and can be used with standard algorithms.
> If I get something working I'll check it in if there's interest.
More information about the llvm-dev