r/cpp • u/_VZ_ wx | soci | swig • Jun 17 '15
Standardizing Variant: Difficult Decisions
https://www.justsoftwaresolutions.co.uk/cplusplus/standardizing-variant.html
30
Upvotes
r/cpp • u/_VZ_ wx | soci | swig • Jun 17 '15
View all comments
Show parent comment
1
u/[deleted] Jun 19 '15 edited Jun 19 '15
Is this only for iterators pointing to the old sentinel nodes (end iterators) or are there other cases? I think storing end iterators in e.g. a vector is not common (one typically stores iterators to the elements), but I guess this means that these can't be moved while iterating since any loop [begin, end) will break if end is invalidated.
Does this mean that for move assignment the container needs to find nodes pointing to the sentinel, and change them to point to the new sentinel?