---
name: "std::_Deque_base"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/std::_Deque_base"
---

# std::\_Deque\_base(3)

## NAME

std::\_Deque\_base\< \_Tp, \_Alloc \>

## SYNOPSIS

\#include \<deque\>

Inherited by **std::deque\< \_Tp, polymorphic\_allocator\< \_Tp \> \>** \[protected\], and **std::deque\< \_Tp, \_Alloc \>** \[protected\].

### 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)\
 Layout storage.  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.

## 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.

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

References **std::max()**.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
