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

◆ _M_erase() [2/2]

template<typename _Tp, typename _Alloc>
deque< _Tp, _Alloc >::iterator deque::_M_erase ( iterator __pos)
protected

Definition at line 235 of file deque.tcc.

237 {
239 ++__next;
241 if (static_cast<size_type>(__index) < (size() >> 1))
242 {
243 if (__position != begin())
245 pop_front();
246 }
247 else
248 {
249 if (__next != end())
251 pop_back();
252 }
253 return begin() + __index;
254 }
#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp)
#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp)
void pop_back() noexcept
Removes last element.
Definition stl_deque.h:1664
size_type size() const noexcept
Definition stl_deque.h:1330
ptrdiff_t difference_type
Definition stl_deque.h:827
void pop_front() noexcept
Removes first element.
Definition stl_deque.h:1641
iterator end() noexcept
Definition stl_deque.h:1232
size_t size_type
Definition stl_deque.h:826
_Base::iterator iterator
Definition stl_deque.h:822
iterator begin() noexcept
Definition stl_deque.h:1213
A standard container using fixed-size memory allocation and constant-time manipulation of elements at...
Definition stl_deque.h:792

References deque(), _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3, begin(), end(), pop_back(), pop_front(), and size().

Here is the call graph for this function: