---
name: "__gnu_cxx::throw_allocator_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/__gnu_cxx::throw_allocator_base"
---

# \_\_gnu\_cxx::throw\_allocator\_base(3)

Allocator class with logging and exception generation control. Intended to be used as an allocator\_type in templatized code.

## NAME

\_\_gnu\_cxx::throw\_allocator\_base\< \_Tp, \_Cond \> - Allocator class with logging and exception generation control. Intended to be used as an allocator\_type in templatized code.

## SYNOPSIS

\#include \<throw\_allocator.h\>

Inherits **\_\_gnu\_cxx::annotate\_base**.

Inherited by **\_\_gnu\_cxx::throw\_allocator\_limit\< \_Tp1 \>**, and **\_\_gnu\_cxx::throw\_allocator\_random\< \_Tp1 \>**.

### Public Types

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

### Public Member Functions

const\_pointer **address** (const\_reference \_\_x) const noexcept\
 pointer **address** (reference \_\_x) const noexcept\
 pointer **allocate** (size\_type \_\_n, const void \*\_\_hint=0)\
 void **check** (size\_type \_\_n)\
 map\_alloc\_type::iterator **check\_allocated** (void \*p, size\_t size)\
 void **check\_allocated** (pointer \_\_p, size\_type \_\_n)\
 void **check\_constructed** (size\_t label)\
 map\_construct\_type::iterator **check\_constructed** (void \*p)\
 template\<typename \_Up, typename... \_Args\> void **construct** (\_Up \*\_\_p, \_Args &&... \_\_args)\
 void **deallocate** (pointer \_\_p, size\_type \_\_n)\
 template\<typename \_Up\> void **destroy** (\_Up \*\_\_p)\
 void **erase** (void \*p, size\_t size)\
 void **erase\_construct** (void \*p)\
 void **insert** (void \*p, size\_t size)\
 void **insert\_construct** (void \*p)\
 size\_type **max\_size** () const noexcept\

### Static Public Member Functions

static void **check** ()\
 static size\_t **get\_label** ()\
 static void **set\_label** (size\_t l)\

## Detailed Description

### template\<typename \_Tp, typename \_Cond\>

class \_\_gnu\_cxx::throw\_allocator\_base\< \_Tp, \_Cond \>"Allocator class with logging and exception generation control. Intended to be used as an allocator\_type in templatized code.

Note: Deallocate not allowed to throw.

## Author

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