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

◆ _M_replace_map()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename... _Args>
void std::deque< _Tp, _Alloc >::_M_replace_map ( _Args &&... __args)
inlineprotected

Definition at line 2358 of file stl_deque.h.

2359 {
2360 // Create new data first, so if allocation fails there are no effects.
2362 // Free existing storage using existing allocator.
2363 clear();
2364 _M_deallocate_node(*begin()._M_node); // one node left after clear()
2366 this->_M_impl._M_map = nullptr;
2367 this->_M_impl._M_map_size = 0;
2368 // Take ownership of replacement memory.
2369 this->_M_impl._M_swap_data(__newobj._M_impl);
2370 }
void _M_deallocate_node(_Ptr __p) noexcept
Definition stl_deque.h:590
void clear() noexcept
Definition stl_deque.h:1934
_Deque_impl _M_impl
Definition stl_deque.h:616
void _M_deallocate_map(_Map_pointer __p, size_t __n) noexcept
Definition stl_deque.h:604
deque()=default
Creates a deque with no elements.
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

Referenced by operator=().

Here is the caller graph for this function: