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

◆ pop_back()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::deque< _Tp, _Alloc >::pop_back ( )
inlinenoexcept

Removes last element.

This is a typical stack operation. It shrinks the deque by one.

Note that no data is returned, and if the last element's data is needed, it should be retrieved before pop_back() is called.

Definition at line 1664 of file stl_deque.h.

1665 {
1667 if (this->_M_impl._M_finish._M_cur
1669 {
1670 --this->_M_impl._M_finish._M_cur;
1672 this->_M_impl._M_finish._M_cur);
1673 }
1674 else
1676 }
#define __glibcxx_requires_nonempty()
Definition assertions.h:41
_Elt_pointer _M_first
Definition stl_deque.h:146
_Deque_impl _M_impl
Definition stl_deque.h:616
_Tp_alloc_type & _M_get_Tp_allocator() noexcept
Definition stl_deque.h:571
void _M_pop_back_aux()
Helper functions for push_* and pop_*.
Definition deque.tcc:561
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 > destroy(_Tp_alloc_type &__a, _Ptr __p) noexcept(noexcept(_Base_type::destroy(__a, std::__to_address(__p))))

Referenced by _M_erase().

Here is the caller graph for this function: