Daily bit(e) of C++ | std::list, std::forward_list
Daily bit(e) of C++ #214, The linked list data structures: std::list and std::forward_list.
The std::list and std::forward_list are containers with perfect iterator stability and support for O(1) splicing of elements.
The only situation that invalidates an iterator is the removal of elements, and only for the removed elements, even when splicing between containers.
Consequently, traversing std::list and std::forward_list is roughly 5x-10x slower than std::vector.