---
name: "__gnu_cxx::throw_allocator"
section: "3"
platform: "linux"
package: "libstdc++6-4.3-doc"
version: "4.3.2-1.1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_cxx::throw_allocator"
---

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

## NAME

\_\_gnu\_cxx::throw\_allocator -

## SYNOPSIS

Inherits **\_\_gnu\_cxx::throw\_allocator\_base**.

## Detailed Description

### template\<typename T\> class \_\_gnu\_cxx::throw\_allocator\< T \>

Allocator class with logging and exception control.

Definition at line 191 of file throw\_allocator.h.

### Public Types

typedef const value\_type \* **const\_pointer**\
 typedef const value\_type & **const\_reference**\
 typedef ptrdiff\_t **difference\_type**\
 typedef value\_type \* **pointer**\
 typedef value\_type & **reference**\
 typedef size\_t **size\_type**\
 typedef T **value\_type**\

### Public Member Functions

pointer **allocate** (size\_type \_\_n, **std::allocator**\< void \>::const\_pointer hint=0)\
 void **check\_allocated** (size\_type label)\
 void **check\_allocated** (pointer \_\_p, size\_type \_\_n)\
 void **construct** (pointer \_\_p, const T &val)\
 void **deallocate** (pointer \_\_p, size\_type \_\_n)\
 void **destroy** (pointer \_\_p)\
 void **init** (unsigned long seed)\
 size\_type **max\_size** () const   throw ()\
 template\<typename U\> **throw\_allocator** (const **throw\_allocator**\< U \> &)  throw ()\
 **throw\_allocator** (const **throw\_allocator** &)  throw ()\

### Static Public Member Functions

static bool **empty** ()\
 static double **get\_throw\_prob** ()\
 static void **set\_label** (size\_t l)\
 static void **set\_throw\_prob** (double throw\_prob)\

### Static Protected Member Functions

static void **check\_allocated** (void \*, size\_t)\
 static void **erase** (void \*, size\_t)\
 static void **insert** (void \*, size\_t)\
 static void **throw\_conditionally** ()\

## Author

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