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:
swap(), operator>>(), and getline().basic_string::swap().data() and c_str() member functions.operator[](), at(), begin(), rbegin(), end(), and rend().insert() and erase() which return iterators, the first call to non-const member functions operator[](), at(), begin(), rbegin(), end(), or rend().