http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58153

--- Comment #4 from Kenton Varda <temporal at gmail dot com> ---
> This report entry made me wonder why iterators could not just be
> pointing to the node just before the one containing the pointed to value.

That's a neat idea.

I think there is an obscure issue, though.  If I have an iterator pointing at
item N, and then I (separately) erase item N - 1, what happens to my iterator?

But you bring up another, simpler point:  why not just have an erase_after()
method like forward_list does?  That would suit my use case (although at this
point I've rewritten it to do something different).

Reply via email to