---
name: "__gnu_cxx::array_allocator"
section: "3cxx"
platform: "linux"
package: "libstdc++-9-doc"
version: "9.3.0-22"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_cxx::array_allocator/3cxx"
---

# \_\_gnu\_cxx::array\_allocator(3cxx)

An allocator that uses previously allocated memory. This memory can be externally, globally, or otherwise allocated.

## NAME

\_\_gnu\_cxx::array\_allocator\< \_Tp, \_Array \> - An allocator that uses previously allocated memory. This memory can be externally, globally, or otherwise allocated.

## SYNOPSIS

Inherits **\_\_gnu\_cxx::array\_allocator\_base\< \_Tp \>**.

### Public Types

typedef \_Array **array\_type**\
 typedef const \_Tp \* **const\_pointer**\
 typedef const \_Tp & **const\_reference**\
 typedef ptrdiff\_t **difference\_type**\
 typedef **std::true\_type** **is\_always\_equal**\
 typedef \_Tp \* **pointer**\
 typedef **std::true\_type** **propagate\_on\_container\_move\_assignment**\
 typedef \_Tp & **reference**\
 typedef size\_t **size\_type**\
 typedef \_Tp **value\_type**\

### Public Member Functions

**array\_allocator** (array\_type \*\_\_array=0) noexcept\
 **array\_allocator** (const **array\_allocator** &\_\_o) noexcept\
 template\<typename \_Tp1 , typename \_Array1 \> **array\_allocator** (const **array\_allocator**\< \_Tp1, \_Array1 \> &) noexcept\
 const\_pointer **address** (const\_reference \_\_x) const noexcept\
 pointer **address** (reference \_\_x) const noexcept\
 \_GLIBCXX\_NODISCARD pointer **allocate** (size\_type \_\_n, const void \*=0)\
 template\<typename \_Up , typename... \_Args\> void **construct** (\_Up \*\_\_p, \_Args &&... \_\_args)\
 void **deallocate** (pointer, size\_type)\
 template\<typename \_Up \> void **destroy** (\_Up \*\_\_p)\
 size\_type **max\_size** () const noexcept\

## Detailed Description

### template\<typename \_Tp, typename \_Array = std::tr1::array\<\_Tp, 1\>\>

class \_\_gnu\_cxx::array\_allocator\< \_Tp, \_Array \>" An allocator that uses previously allocated memory. This memory can be externally, globally, or otherwise allocated.

Definition at line 110 of file array\_allocator.h.

## Author

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