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
or by any InputIterator
there are no effects.
If an exception is thrown while inserting a single element at the end and
, there are no effects.
Otherwise, if an exception is thrown by the move constructor of a non-Cpp17CopyInsertable
, the effects are unspecified.