¡@

Home 

c++ Programming Glossary: readpos

Keeping std::list iterators valid through insertion

http://stackoverflow.com/questions/6230350/keeping-stdlist-iterators-valid-through-insertion

I'm maintaining my current read position as an iterator readpos . When I add data I do something like buf.insert buf.end newdata.begin.. newdata.end My question is now how do I keep the readpos iterator valid If it points to the middle of the old buf then.. I may have read and processed all data and I have readpos buf.end . After the insertion I want readpos always to point..