References, pointers, and iterators referring to the elements of a
basic_string sequence may be
invalidated by the following uses of that
basic_string object:
Passing as an argument to any standard library function taking a reference to non-const
basic_string as an argument
.Calling non-const member functions, except
operator[],
at,
data,
front,
back,
begin,
rbegin,
end,
and
rend.