vector::operator[i] is undefined if i is greater than or equal to the size of the container.