Template:cpp/container/constant iterator note
From cppreference.com
Because both iterator
and const_iterator
are constant iterators (and may in fact be the same type), it is not possible to mutate the elements of the container through an iterator returned by any of these member functions.