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

◆ _M_erase() [1/2]

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

Definition at line 258 of file deque.tcc.

260 {
261 if (__first == __last)
262 return __first;
263 else if (__first == begin() && __last == end())
264 {
265 clear();
266 return end();
267 }
268 else
269 {
272 if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2)
273 {
274 if (__first != begin())
277 }
278 else
279 {
280 if (__last != end())
283 }
284 return begin() + __elems_before;
285 }
286 }
#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp)
#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp)
void clear() noexcept
Definition stl_deque.h:1934
size_type size() const noexcept
Definition stl_deque.h:1330
ptrdiff_t difference_type
Definition stl_deque.h:827
void _M_erase_at_begin(iterator __pos)
Definition stl_deque.h:2238
void _M_erase_at_end(iterator __pos)
Definition stl_deque.h:2248
iterator end() noexcept
Definition stl_deque.h:1232
size_t size_type
Definition stl_deque.h:826
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, _M_erase_at_begin(), _M_erase_at_end(), begin(), clear(), end(), and size().

Here is the call graph for this function: