libstdc++: std::_Deque_base< _Tp, _Alloc > Class Template Reference

libstdc++

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

`#include <stl_deque.h>`

Inheritance diagram for std::_Deque_base< _Tp, _Alloc >:
[legend]

## Protected Types
enum | { _S_initial_map_size }
typedef __gnu_cxx::__alloc_traits< _Tp_alloc_type > | _Alloc_traits
typedef __gnu_cxx::__alloc_traits< _Map_alloc_type > | _Map_alloc_traits
typedef _Alloc_traits::template rebind< _Ptr >::other | _Map_alloc_type
typedef iterator::_Map_pointer | _Map_pointer
typedef _Alloc_traits::pointer | _Ptr
typedef _Alloc_traits::const_pointer | _Ptr_const
typedef __gnu_cxx::__alloc_traits< _Alloc >::template rebind< _Tp >::other | _Tp_alloc_type
typedef _Alloc | allocator_type
typedef _Deque_iterator< _Tp, const _Tp &, _Ptr_const > | const_iterator
typedef _Deque_iterator< _Tp, _Tp &, _Ptr > | iterator

## Protected Member Functions
| _Deque_base (_Deque_base &&__x)
| _Deque_base (_Deque_base &&__x, const allocator_type &__a)
| _Deque_base (_Deque_base &&__x, const allocator_type &__a, size_t __n)
| _Deque_base (const allocator_type &__a)
| _Deque_base (const allocator_type &__a, size_t __num_elements)
| _Deque_base (size_t __num_elements)
_Map_pointer | _M_allocate_map (size_t __n)
_Ptr | _M_allocate_node ()
void | _M_create_nodes (_Map_pointer __nstart, _Map_pointer __nfinish)
void | _M_deallocate_map (_Map_pointer __p, size_t __n) noexcept
void | _M_deallocate_node (_Ptr __p) noexcept
void | _M_destroy_nodes (_Map_pointer __nstart, _Map_pointer __nfinish) noexcept
_Map_alloc_type | _M_get_map_allocator () const noexcept
const _Tp_alloc_type & | _M_get_Tp_allocator () const noexcept
_Tp_alloc_type & | _M_get_Tp_allocator () noexcept
void | _M_initialize_map (size_t)
allocator_type | get_allocator () const noexcept

## Protected Attributes
_Deque_impl | _M_impl

## 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 470 of file stl_deque.h.

## Member Typedef Documentation

## ◆ _Alloc_traits

template<typename _Tp, typename _Alloc>

typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> std::_Deque_base< _Tp, _Alloc >::_Alloc_traits
| protected

Definition at line 475 of file stl_deque.h.

## ◆ _Map_alloc_traits

template<typename _Tp, typename _Alloc>

typedef __gnu_cxx::__alloc_traits<_Map_alloc_type> std::_Deque_base< _Tp, _Alloc >::_Map_alloc_traits
| protected

Definition at line 487 of file stl_deque.h.

## ◆ _Map_alloc_type

template<typename _Tp, typename _Alloc>

typedef _Alloc_traits::template rebind<_Ptr>::other std::_Deque_base< _Tp, _Alloc >::_Map_alloc_type
| protected

Definition at line 486 of file stl_deque.h.

## ◆ _Map_pointer

template<typename _Tp, typename _Alloc>

typedef iterator::_Map_pointer std::_Deque_base< _Tp, _Alloc >::_Map_pointer
| protected

Definition at line 547 of file stl_deque.h.

## ◆ _Ptr

template<typename _Tp, typename _Alloc>

typedef _Alloc_traits::pointer std::_Deque_base< _Tp, _Alloc >::_Ptr
| protected

Definition at line 481 of file stl_deque.h.

## ◆ _Ptr_const

template<typename _Tp, typename _Alloc>

typedef _Alloc_traits::const_pointer std::_Deque_base< _Tp, _Alloc >::_Ptr_const
| protected

Definition at line 482 of file stl_deque.h.

## ◆ _Tp_alloc_type

template<typename _Tp, typename _Alloc>

typedef __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other std::_Deque_base< _Tp, _Alloc >::_Tp_alloc_type
| protected

Definition at line 474 of file stl_deque.h.

## ◆ allocator_type

template<typename _Tp, typename _Alloc>

typedef _Alloc std::_Deque_base< _Tp, _Alloc >::allocator_type
| protected

Definition at line 489 of file stl_deque.h.

## ◆ const_iterator

template<typename _Tp, typename _Alloc>

typedef _Deque_iterator<_Tp, const _Tp&, _Ptr_const> std::_Deque_base< _Tp, _Alloc >::const_iterator
| protected

Definition at line 496 of file stl_deque.h.

## ◆ iterator

template<typename _Tp, typename _Alloc>

typedef _Deque_iterator<_Tp, _Tp&, _Ptr> std::_Deque_base< _Tp, _Alloc >::iterator
| protected

Definition at line 495 of file stl_deque.h.

## Member Enumeration Documentation

## ◆ anonymous enum

template<typename _Tp, typename _Alloc>

anonymous enum
| protected

Definition at line 651 of file stl_deque.h.

## Constructor & Destructor Documentation

## ◆ _Deque_base() [1/7]

template<typename _Tp, typename _Alloc>

std::_Deque_base< _Tp, _Alloc >::_Deque_base | ( |  | ) |
| inlineprotected

Definition at line 498 of file stl_deque.h.

## ◆ _Deque_base() [2/7]

template<typename _Tp, typename _Alloc>

std::_Deque_base< _Tp, _Alloc >::_Deque_base | ( | size_t | __num_elements | ) |
| inlineprotected

Definition at line 502 of file stl_deque.h.

## ◆ _Deque_base() [3/7]

template<typename _Tp, typename _Alloc>

std::_Deque_base< _Tp, _Alloc >::_Deque_base | ( | const allocator_type & | __a,
|  | size_t | __num_elements )
| inlineprotected

Definition at line 506 of file stl_deque.h.

## ◆ _Deque_base() [4/7]

template<typename _Tp, typename _Alloc>

std::_Deque_base< _Tp, _Alloc >::_Deque_base | ( | const allocator_type & | __a | ) |
| inlineprotected

Definition at line 510 of file stl_deque.h.

## ◆ _Deque_base() [5/7]

template<typename _Tp, typename _Alloc>

std::_Deque_base< _Tp, _Alloc >::_Deque_base | ( | _Deque_base< _Tp, _Alloc > && | __x | ) |
| inlineprotected

Definition at line 515 of file stl_deque.h.

## ◆ _Deque_base() [6/7]

template<typename _Tp, typename _Alloc>

std::_Deque_base< _Tp, _Alloc >::_Deque_base | ( | _Deque_base< _Tp, _Alloc > && | __x,
|  | const allocator_type & | __a )
| inlineprotected

Definition at line 523 of file stl_deque.h.

## ◆ _Deque_base() [7/7]

template<typename _Tp, typename _Alloc>

std::_Deque_base< _Tp, _Alloc >::_Deque_base | ( | _Deque_base< _Tp, _Alloc > && | __x,
|  | const allocator_type & | __a,
|  | size_t | __n )
| inlineprotected

Definition at line 527 of file stl_deque.h.

## ◆ ~_Deque_base()

template<typename _Tp, typename _Alloc>

std::_Deque_base< _Tp, _Alloc >::~_Deque_base | ( |  | ) |
| protectednoexcept

Definition at line 657 of file stl_deque.h.

## Member Function Documentation

## ◆ _M_allocate_map()

template<typename _Tp, typename _Alloc>

_Map_pointer std::_Deque_base< _Tp, _Alloc >::_M_allocate_map | ( | size_t | __n | ) |
| inlineprotected

Definition at line 634 of file stl_deque.h.

## ◆ _M_allocate_node()

template<typename _Tp, typename _Alloc>

_Ptr std::_Deque_base< _Tp, _Alloc >::_M_allocate_node | ( |  | ) |
| inlineprotected

Definition at line 620 of file stl_deque.h.

## ◆ _M_create_nodes()

template<typename _Tp, typename _Alloc>

void std::_Deque_base< _Tp, _Alloc >::_M_create_nodes | ( | _Map_pointer | __nstart,
|  | _Map_pointer | __nfinish )
| protected

Definition at line 716 of file stl_deque.h.

## ◆ _M_deallocate_map()

template<typename _Tp, typename _Alloc>

void std::_Deque_base< _Tp, _Alloc >::_M_deallocate_map | ( | _Map_pointer | __p,
|  | size_t | __n )
| inlineprotectednoexcept

Definition at line 641 of file stl_deque.h.

## ◆ _M_deallocate_node()

template<typename _Tp, typename _Alloc>

void std::_Deque_base< _Tp, _Alloc >::_M_deallocate_node | ( | _Ptr | __p | ) |
| inlineprotectednoexcept

Definition at line 627 of file stl_deque.h.

## ◆ _M_destroy_nodes()

template<typename _Tp, typename _Alloc>

void std::_Deque_base< _Tp, _Alloc >::_M_destroy_nodes | ( | _Map_pointer | __nstart,
|  | _Map_pointer | __nfinish )
| protectednoexcept

Definition at line 734 of file stl_deque.h.

## ◆ _M_get_map_allocator()

template<typename _Tp, typename _Alloc>

_Map_alloc_type std::_Deque_base< _Tp, _Alloc >::_M_get_map_allocator | ( |  | ) | const
| inlineprotectednoexcept

Definition at line 616 of file stl_deque.h.

## ◆ _M_get_Tp_allocator() [1/2]

template<typename _Tp, typename _Alloc>

const _Tp_alloc_type & std::_Deque_base< _Tp, _Alloc >::_M_get_Tp_allocator | ( |  | ) | const
| inlineprotectednoexcept

Definition at line 612 of file stl_deque.h.

## ◆ _M_get_Tp_allocator() [2/2]

template<typename _Tp, typename _Alloc>

_Tp_alloc_type & std::_Deque_base< _Tp, _Alloc >::_M_get_Tp_allocator | ( |  | ) |
| inlineprotectednoexcept

Definition at line 608 of file stl_deque.h.

## ◆ _M_initialize_map()

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.

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

Definition at line 677 of file stl_deque.h.

References std::max().

## ◆ get_allocator()

template<typename _Tp, typename _Alloc>

allocator_type std::_Deque_base< _Tp, _Alloc >::get_allocator | ( |  | ) | const
| inlineprotectednoexcept

Definition at line 492 of file stl_deque.h.

## Member Data Documentation

## ◆ _M_impl

template<typename _Tp, typename _Alloc>

_Deque_impl std::_Deque_base< _Tp, _Alloc >::_M_impl
| protected

Definition at line 653 of file stl_deque.h.

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

- stl_deque.h