# std::_Deque_base< _Tp, _Alloc > Class Template Reference

Inheritance diagram for std::_Deque_base< _Tp, _Alloc >:

List of all members.

## Detailed Description

### template<typename _Tp, typename _Alloc>
class std::_Deque_base< _Tp, _Alloc >

Deque base class. This class provides the unified face for deque's allocation. This class's constructor and destructor allocate and deallocate (but do not initialize) storage. This makes exception safety easier.

Nothing in this class ever constructs or destroys an actual Tp element. (Deque handles that itself.) Only/All memory management is performed here.

Definition at line 365 of file stl_deque.h.

## Public Types

- typedef _Alloc allocator_type
- typedef _Deque_iterator< _Tp,
  const _Tp &, const _Tp * > const_iterator
- typedef _Deque_iterator< _Tp,
  _Tp &, _Tp * > iterator

## Public Member Functions

- _Deque_base (const allocator_type &__a)
- _Deque_base (const allocator_type &__a, size_t __num_elements)
- _Deque_base ()
- allocator_type get_allocator () const
- ~_Deque_base ()

## Protected Types

- enum { _S_initial_map_size }
- typedef _Alloc::template rebind<
  _Tp * >::other _Map_alloc_type
- typedef _Alloc::template rebind<
  _Tp >::other _Tp_alloc_type

## Protected Member Functions

- _Tp ** _M_allocate_map (size_t __n)
- _Tp * _M_allocate_node ()
- void _M_create_nodes (_Tp **__nstart, _Tp **__nfinish)
- void _M_deallocate_map (_Tp **__p, size_t __n)
- void _M_deallocate_node (_Tp *__p)
- void _M_destroy_nodes (_Tp **__nstart, _Tp **__nfinish)
- _Map_alloc_type _M_get_map_allocator () const
- const _Tp_alloc_type & _M_get_Tp_allocator () const
- _Tp_alloc_type & _M_get_Tp_allocator ()
- void _M_initialize_map (size_t)

## Protected Attributes

- _Deque_impl _M_impl

## Classes

- struct _Deque_impl

## Member Function Documentation

template<typename _Tp, typename _Alloc>

void std::_Deque_base< _Tp, _Alloc >::_M_initialize_map | ( | size_t | __num_elements | ) | `[protected]`

Layout storage.

Parameters:

  | num_elements | The count of T's for which to allocate space at first.

Returns:
  Nothing.

The initial underlying memory layout is a bit complicated...

Definition at line 497 of file stl_deque.h.

References std::__deque_buf_size(), std::_Deque_base< _Tp, _Alloc >::_M_allocate_map(), std::_Deque_base< _Tp, _Alloc >::_M_create_nodes(), std::_Deque_iterator< _Tp, _Ref, _Ptr >::_M_cur, std::_Deque_base< _Tp, _Alloc >::_M_deallocate_map(), std::_Deque_base< _Tp, _Alloc >::_Deque_impl::_M_finish, std::_Deque_iterator< _Tp, _Ref, _Ptr >::_M_first, std::_Deque_base< _Tp, _Alloc >::_M_impl, std::_Deque_base< _Tp, _Alloc >::_Deque_impl::_M_map, std::_Deque_base< _Tp, _Alloc >::_Deque_impl::_M_map_size, std::_Deque_iterator< _Tp, _Ref, _Ptr >::_M_set_node(), std::_Deque_base< _Tp, _Alloc >::_Deque_impl::_M_start, and std::max().

Referenced by std::deque< _Tp, _Alloc >::_M_initialize_dispatch(), and std::deque< _Tp, _Alloc >::_M_range_initialize().

The documentation for this class was generated from the following file:

- stl_deque.h