array::push_back
Add an element to the end.
Synopsis
Description
Insert a new element at the end of the container. (1) copy-constructs the new element from jv
, (2) move-constructs from jv
.
If capacity() < size() + 1
, a reallocation occurs first, and all iterators and references are invalidated. Any past-the-end iterators are always invalidated.
The new element will be constructed using the container’s associated boost::container::pmr::memory_resource
.
Complexity
Amortized constant.
Exception Safety
Strong guarantee. Calls to memory_resource::allocate
may throw.
Parameters
Name | Description |
---|---|
|
The value to insert. |