In every specialization
basic_string<charT, traits, Allocator>,
the type
allocator_traits<Allocator>::value_type shall name the same type
as
charT. Every object of type
basic_string<charT, traits, Allocator> shall use an object of type
Allocator to allocate and free storage for the contained
charT
objects as needed
. In every specialization
basic_string<charT, traits, Allocator>,
the type
traits shall satisfy
the character traits requirements (
[char.traits]), and
the type
traits::char_type shall name 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:
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.