Should std::vector::swap() with stateful allocators invalidate all iterators?

Viewed 1657

Given allocators a1 and a2, where a1 != a2,

and std::vectors v1(a1) and v2(a2)

then v1.swap(v2) invalidates all iterators.

Is this expected behavior?

1 Answers
Related