__gnu_cxx::debug_allocator< _Alloc > Class Template Reference
Utilities » Memory » Allocators

`#include <debug_allocator.h>`

## Public Types

typedef _Traits::const_pointer | const_pointer
typedef _Traits::const_reference | const_reference
typedef _Traits::difference_type | difference_type
typedef _Traits::pointer | pointer
typedef _Traits::reference | reference
typedef _Traits::size_type | size_type
typedef _Traits::value_type | value_type

## Public Member Functions

| debug_allocator (const _Alloc &__a)
template<typename _Alloc2>
| debug_allocator (const debug_allocator< _Alloc2 > &__a2, typename __convertible< _Alloc2 >::__type=0)
pointer | allocate (size_type __n)
pointer | allocate (size_type __n, const void *__hint)
template<typename _Tp, typename... _Args>
void | construct (_Tp *__p, _Args &&... __args)
void | construct (pointer __p, const value_type &__val)
void | deallocate (pointer __p, size_type __n)
template<typename _Tp>
void | destroy (_Tp *__p)
size_type | max_size () const throw ()

## Friends

template<typename _Alloc2>
bool | operator!= (const debug_allocator &__lhs, const debug_allocator< _Alloc2 > &__rhs) noexcept
template<typename _Alloc2>
bool | operator== (const debug_allocator &__lhs, const debug_allocator< _Alloc2 > &__rhs) noexcept

## Detailed Description

template<typename _Alloc>
class __gnu_cxx::debug_allocator< _Alloc >

A meta-allocator with debugging bits.

This is precisely the allocator defined in the C++03 Standard.

Definition at line 60 of file debug_allocator.h.

## Member Typedef Documentation

## const_pointer

template<typename _Alloc>

typedef _Traits::const_pointer __gnu_cxx::debug_allocator< _Alloc >::const_pointer

Definition at line 70 of file debug_allocator.h.

## const_reference

template<typename _Alloc>

typedef _Traits::const_reference __gnu_cxx::debug_allocator< _Alloc >::const_reference

Definition at line 72 of file debug_allocator.h.

## difference_type

template<typename _Alloc>

typedef _Traits::difference_type __gnu_cxx::debug_allocator< _Alloc >::difference_type

Definition at line 68 of file debug_allocator.h.

## pointer

template<typename _Alloc>

typedef _Traits::pointer __gnu_cxx::debug_allocator< _Alloc >::pointer

Definition at line 69 of file debug_allocator.h.

## reference

template<typename _Alloc>

typedef _Traits::reference __gnu_cxx::debug_allocator< _Alloc >::reference

Definition at line 71 of file debug_allocator.h.

## size_type

template<typename _Alloc>

typedef _Traits::size_type __gnu_cxx::debug_allocator< _Alloc >::size_type

Definition at line 67 of file debug_allocator.h.

## value_type

template<typename _Alloc>

typedef _Traits::value_type __gnu_cxx::debug_allocator< _Alloc >::value_type

Definition at line 73 of file debug_allocator.h.

## Constructor & Destructor Documentation

## debug_allocator() [1/3]

template<typename _Alloc>

__gnu_cxx::debug_allocator< _Alloc >::debug_allocator | ( |  | ) |

inline

Definition at line 110 of file debug_allocator.h.

## debug_allocator() [2/3]

template<typename _Alloc>
template<typename _Alloc2>

__gnu_cxx::debug_allocator< _Alloc >::debug_allocator | ( | const debug_allocator< _Alloc2 > & | __a2,
|  | typename __convertible< _Alloc2 >::__type | = 0 )

inline

Definition at line 113 of file debug_allocator.h.

## debug_allocator() [3/3]

template<typename _Alloc>

__gnu_cxx::debug_allocator< _Alloc >::debug_allocator | ( | const _Alloc & | __a | ) |

inline

Definition at line 117 of file debug_allocator.h.

## Member Function Documentation

## allocate() [1/2]

template<typename _Alloc>

pointer __gnu_cxx::debug_allocator< _Alloc >::allocate | ( | size_type | __n | ) |

inline nodiscard

Definition at line 121 of file debug_allocator.h.

## allocate() [2/2]

template<typename _Alloc>

pointer __gnu_cxx::debug_allocator< _Alloc >::allocate | ( | size_type | __n,
|  | const void * | __hint )

inline nodiscard

Definition at line 130 of file debug_allocator.h.

## construct() [1/2]

template<typename _Alloc>
template<typename _Tp, typename... _Args>

void __gnu_cxx::debug_allocator< _Alloc >::construct | ( | _Tp * | __p,
|  | _Args &&... | __args )

inline

Definition at line 160 of file debug_allocator.h.

## construct() [2/2]

template<typename _Alloc>

void __gnu_cxx::debug_allocator< _Alloc >::construct | ( | pointer | __p,
|  | const value_type & | __val )

inline

Definition at line 154 of file debug_allocator.h.

## deallocate()

template<typename _Alloc>

void __gnu_cxx::debug_allocator< _Alloc >::deallocate | ( | pointer | __p,
|  | size_type | __n )

inline

Definition at line 139 of file debug_allocator.h.

## destroy()

template<typename _Alloc>
template<typename _Tp>

void __gnu_cxx::debug_allocator< _Alloc >::destroy | ( | _Tp * | __p | ) |

inline

Definition at line 169 of file debug_allocator.h.

## max_size()

template<typename _Alloc>

size_type __gnu_cxx::debug_allocator< _Alloc >::max_size | ( |  | ) | const
throw | ( | ) |  |  |

inline

Definition at line 173 of file debug_allocator.h.

## Friends And Related Symbol Documentation

## debug_allocator

template<typename _Alloc>
template<typename>

friend class debug_allocator

friend

Definition at line 62 of file debug_allocator.h.

## operator!=

template<typename _Alloc>
template<typename _Alloc2>

bool operator!= | ( | const debug_allocator< _Alloc > & | __lhs,
|  | const debug_allocator< _Alloc2 > & | __rhs )

friend

Definition at line 185 of file debug_allocator.h.

## operator==

template<typename _Alloc>
template<typename _Alloc2>

bool operator== | ( | const debug_allocator< _Alloc > & | __lhs,
|  | const debug_allocator< _Alloc2 > & | __rhs )

friend

Definition at line 178 of file debug_allocator.h.

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

- debug_allocator.h