libstdc++
GNU C++ library
Loading...
Searching...
No Matches

◆ push_back() [1/2]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::deque< _Tp, _Alloc >::push_back ( const value_type & __x)
inline

Add data to the end of the deque.

Parameters
__xData to be added.

This is a typical stack operation. The function creates an element at the end of the deque and assigns the given data to it. Due to the nature of a deque this operation can be done in constant time.

Definition at line 1605 of file stl_deque.h.

1606 {
1607 if (this->_M_impl._M_finish._M_cur
1608 != this->_M_impl._M_finish._M_last - 1)
1609 {
1611 this->_M_impl._M_finish._M_cur, __x);
1612 ++this->_M_impl._M_finish._M_cur;
1613 }
1614 else
1616 }
_Elt_pointer _M_last
Definition stl_deque.h:147
_Deque_impl _M_impl
Definition stl_deque.h:616
void _M_push_back_aux(_Args &&... __args)
Helper functions for push_* and pop_*.
Definition deque.tcc:485
A standard container using fixed-size memory allocation and constant-time manipulation of elements at...
Definition stl_deque.h:792
static constexpr std::__enable_if_t< __is_custom_pointer< _Ptr >::value > construct(_Tp_alloc_type &__a, _Ptr __p, _Args &&... __args) noexcept(noexcept(_Base_type::construct(__a, std::__to_address(__p), std::forward< _Args >(__args)...)))

Referenced by _M_emplace_aux(), _M_range_initialize(), and insert().

Here is the caller graph for this function: