Every object of type
basic_string<charT, traits, Allocator> uses an object of type
Allocator to allocate and free storage for the contained charT
objects as needed.
Every specialization basic_string<charT, traits, Allocator> is
an allocator-aware container ([container.alloc.reqmts]),
but does not use the allocator's construct and destroy
member functions ([container.requirements.pre]).
The program is ill-formed if
Allocator::value_type is not the same type as charT.
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:
For example, as an argument to non-member
functions swap() ([string.special]),
operator>>() ([string.io]), and getline() ([string.io]), or as
an argument to basic_string::swap().