• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

STL question

ElDonAntonio

Senior member
I read that only random access iterators support operations such as "+(int)" or comparison operators. Are random access iterators only valid with vectors and deques? can't they be used with a list?

Thanks guys!
 
The reasons others don't support them is because their underlying data structures do not provide (efficient) access to randomly access an element. Lists are implemented using linked-lists, so you don't expect them to provide random access.
 
Back
Top