Remarks:
Causes reallocation if the new size is greater than the old capacity
. Reallocation invalidates all the references, pointers, and iterators
referring to the elements in the sequence
. If no reallocation happens, all the iterators and references before the insertion point remain valid
. If an exception is thrown other than by
the copy constructor, move constructor,
assignment operator, or move assignment operator of
T or by any
InputIterator operation
there are no effects
. If an exception is thrown while inserting a single element at the end and
T is
Cpp17CopyInsertable or
is_nothrow_move_constructible_v<T>
is
true, there are no effects
. Otherwise, if an exception is thrown by the move constructor of a non-
Cpp17CopyInsertable
T, the effects are unspecified
.