Skip to content

Why are Sparta::Buffer::erase(const iter&) return type void? Does Sparta::Buffer:erase(const iter&) invalidate iterators? How to handle erase() in an iterator loop? #459

Closed Answered by klingaard
timsnyder asked this question in Q&A
Discussion options

You must be logged in to vote

No, there's no good reason that it doesn't return the next iterator. I think this was based on an older C++ STL design. In fact, there are a few issues with Buffer, Queue, etc that I already started documenting here: #247

Feel free to convert this to an issue and either make the changes or leave it unassigned and I'll grab it.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by klingaard
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants