The elements are stored contiguously, which means that elements can be accessed not only through iterators, but also using offsets to regular pointers to elements.
I guess that's not the ISO, but I'm not about to pull that out.
Quote from the book "From Mathematics to Generic Programming" by Alexander Stepanov (the creator of the stl) and Daniel Rose:
The name vector in STL was taken from the earlier programming languages Scheme and Common Lisp. Unfortunately, this was inconsistent with the much older meaning of the term in mathematics and violates Rule 3; this data structure should have been called array. Sadly, if you make a mistake and violate these principles, the result might stay around for a long time.
View all comments
Show parent comment
1
u/da_Aresinger 11d ago
I mean, cppreference literally says:
I guess that's not the ISO, but I'm not about to pull that out.