- 10 Poll What Are The Iterator Invalidation Rules For Insertion Into Std Vector And Stilist For Vector If A New Array 1 (22.06 KiB) Viewed 18 times
10 poll What are the iterator invalidation rules for insertion into std::vector and stilist? For vector: If a new array
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
10 poll What are the iterator invalidation rules for insertion into std::vector and stilist? For vector: If a new array
10 poll What are the iterator invalidation rules for insertion into std::vector and stilist? For vector: If a new array is not allocated, then all the iterators at or after the point of insertion are invalid because of shifting the elements.If a new array is allocated, then all the iterators are invalid. For list:Iterators stay Valid. For vector: If a new array is not allocated, then all the iterators at or before the point of insertion are invalid because of shifting the elements. It a new array is allocated then all the iterators are invalid. For list:Iterators stay valid only if inserted at the front All the iterators become invalid for both vector and list For vector: Iterators become invalid only it a new array is allocated For list:Iterators stay valid All the iterators stay valid for both vector and list