Y
Hacker News
new
|
ask
|
show
|
jobs
by
leetcrew
2308 days ago
how do small vectors break iterator guarantees?
2 comments
mehrdadn
2308 days ago
By invalidating iterators (and pointers and references) when swapping:
https://stackoverflow.com/a/8191356
link
gpderetta
2308 days ago
Not sure about iterators, but they do break reference guarantees. Moving a vector doesn't invalidate pointers to the contained elements.
link