std::allocator< void > Class Reference
Utilities » Memory » Allocators

`#include <memory>`

Inheritance diagram for std::allocator< void >:
[legend]

## Public Types

typedef ptrdiff_t | difference_type
typedef ptrdiff_t | difference_type
using | is_always_equal
using | is_always_equal
using | propagate_on_container_move_assignment
using | propagate_on_container_move_assignment
typedef size_t | size_type
typedef size_t | size_type
typedef void | value_type
typedef void | value_type

## Public Member Functions

constexpr | allocator (const allocator &__a) noexcept
constexpr | allocator (const allocator< _Tp1 > &) noexcept
template<typename _Up>
constexpr | allocator (const allocator< _Up > &) noexcept
constexpr void * | allocate (size_t __n)
void * | allocate (size_type __n, const void *=static_cast< const void * >(0))
void * | allocate (size_type __n, const void *=static_cast< const void * >(0))
void | deallocate (_Tp *__p, size_type __n)
constexpr void | deallocate (void *__p, size_t __n)
allocator & | operator= (const allocator &)=default

## Friends

constexpr bool | operator== (const allocator &, const allocator &) noexcept

## Related Symbols

(Note that these are not member symbols.)
constexpr bool | operator== (const allocator< _T1 > &, const allocator< _T2 > &) noexcept
constexpr bool | operator== (const allocator< _T1 > &, const allocator< _T2 > &) noexcept

## Detailed Description

std::allocator<void> specialization.

Definition at line 75 of file allocator.h.

## Member Typedef Documentation

## difference_type [1/2]

typedef ptrdiff_t std::allocator< void >::difference_type

Definition at line 135 of file allocator.h.

## difference_type [2/2]

typedef ptrdiff_t std::allocator< void >::difference_type

Definition at line 80 of file allocator.h.

## is_always_equal [1/2]

using std::allocator< void >::is_always_equal

Definition at line 154 of file allocator.h.

## is_always_equal [2/2]

using std::allocator< void >::is_always_equal

Definition at line 97 of file allocator.h.

## propagate_on_container_move_assignment [1/2]

using std::allocator< void >::propagate_on_container_move_assignment

Definition at line 152 of file allocator.h.

## propagate_on_container_move_assignment [2/2]

using std::allocator< void >::propagate_on_container_move_assignment

Definition at line 95 of file allocator.h.

## size_type [1/2]

typedef size_t std::allocator< void >::size_type

Definition at line 134 of file allocator.h.

## size_type [2/2]

typedef size_t std::allocator< void >::size_type

Definition at line 79 of file allocator.h.

## value_type [1/2]

typedef void std::allocator< void >::value_type

Definition at line 133 of file allocator.h.

## value_type [2/2]

typedef void std::allocator< void >::value_type

Definition at line 78 of file allocator.h.

## Constructor & Destructor Documentation

## allocator() [1/4]

template<typename _Up>

std::allocator< void >::allocator | ( | const allocator< _Up > & |  | ) |

inline constexpr noexcept

Definition at line 108 of file allocator.h.

## allocator() [2/4]

std::allocator< void >::allocator | ( |  | ) |

inline constexpr noexcept

Definition at line 161 of file allocator.h.

## allocator() [3/4]

std::allocator< void >::allocator | ( | const allocator< void > & | __a | ) |

inline constexpr noexcept

Definition at line 165 of file allocator.h.

## allocator() [4/4]

std::allocator< void >::allocator | ( | const allocator< _Tp1 > & |  | ) |

inline constexpr noexcept

Definition at line 176 of file allocator.h.

## ~allocator()

std::allocator< void >::~allocator | ( |  | ) |

inline constexpr noexcept

Definition at line 182 of file allocator.h.

## Member Function Documentation

## allocate() [1/3]

void * std::allocator< void >::allocate | ( | size_t | __n | ) |

inline nodiscard constexpr

Definition at line 187 of file allocator.h.

## allocate() [2/3]

void * std::__new_allocator< void >::allocate | ( | size_type | __n,
|  | const void * | = static_cast<const void*>(0) )

inline nodiscard

Definition at line 126 of file bits/new_allocator.h.

## allocate() [3/3]

void * std::__new_allocator< void >::allocate | ( | size_type | __n,
|  | const void * | = static_cast<const void*>(0) )

inline nodiscard

Definition at line 126 of file bits/new_allocator.h.

## deallocate() [1/2]

template<typename _Tp>

void std::__new_allocator< _Tp >::deallocate | ( | _Tp * | __p,
|  | size_type | __n )

inline inherited

Definition at line 156 of file bits/new_allocator.h.

## deallocate() [2/2]

void std::allocator< void >::deallocate | ( | void * | __p,
|  | size_t | __n )

inline constexpr

Definition at line 201 of file allocator.h.

## Friends And Related Symbol Documentation

## operator== [1/3]

bool operator== | ( | const allocator< void > & | ,
|  | const allocator< void > & | )

friend

Definition at line 214 of file allocator.h.

## operator==() [2/3]

bool operator== | ( | const allocator< _T1 > & | ,
|  | const allocator< _T2 > & | )

related

Equality comparison for std::allocator objects

Returns
  true, for all std::allocator objects.

Definition at line 237 of file allocator.h.

## operator==() [3/3]

bool operator== | ( | const allocator< _T1 > & | ,
|  | const allocator< _T2 > & | )

related

Equality comparison for std::allocator objects

Returns
  true, for all std::allocator objects.

Definition at line 237 of file allocator.h.

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

- allocator.h