ObjectSpace STL manual said “stl algorithms only access data via
iterators”. I don't know if this is 100% true today, but STL creators
indeed designed their algorithms to be container-agnostic.
STL was designed as, first and foremost, building-block data structures
known as containers. Essential operations on containers are provided in
2 forms
– methods of the container classes (class templates actually). These are
“trusted” members and therefore can modify container content.
– container-agnostic free-functions known as STL algorithms
The link between the algorithms and containers is the iterator.