libstdc++: std::allocator< void > Class Reference

libstdc++

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 | 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)
constexpr void * | allocate (size_type __n, const void *=static_cast< const void * >(0))
constexpr void * | allocate (size_type __n, const void *=static_cast< const void * >(0))
constexpr allocation_result< void *, size_t > | allocate_at_least (size_t __n)
constexpr 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 76 of file allocator.h.

## Member Typedef Documentation

## ◆ difference_type [1/2]

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

Definition at line 138 of file allocator.h.

## ◆ difference_type [2/2]

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

Definition at line 81 of file allocator.h.

## ◆ propagate_on_container_move_assignment [1/2]

using std::allocator< void >::propagate_on_container_move_assignment

Definition at line 155 of file allocator.h.

## ◆ propagate_on_container_move_assignment [2/2]

using std::allocator< void >::propagate_on_container_move_assignment

Definition at line 96 of file allocator.h.

## ◆ size_type [1/2]

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

Definition at line 137 of file allocator.h.

## ◆ size_type [2/2]

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

Definition at line 80 of file allocator.h.

## ◆ value_type [1/2]

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

Definition at line 136 of file allocator.h.

## ◆ value_type [2/2]

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

Definition at line 79 of file allocator.h.

## Constructor & Destructor Documentation

## ◆ allocator() [1/4]

template<typename _Up>

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

Definition at line 113 of file allocator.h.

## ◆ allocator() [2/4]

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

Definition at line 168 of file allocator.h.

## ◆ allocator() [3/4]

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

Definition at line 172 of file allocator.h.

## ◆ allocator() [4/4]

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

Definition at line 183 of file allocator.h.

## ◆ ~allocator()

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

Definition at line 189 of file allocator.h.

## Member Function Documentation

## ◆ allocate() [1/3]

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

Definition at line 194 of file allocator.h.

## ◆ allocate() [2/3]

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

Definition at line 129 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) )
| inlinenodiscardconstexpr

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

## ◆ allocate_at_least()

allocation_result< void *, size_t > std::allocator< void >::allocate_at_least | ( | size_t | __n | ) |
| inlinenodiscardconstexpr

Definition at line 224 of file allocator.h.

## ◆ deallocate() [1/2]

template<typename _Tp>

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

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

## ◆ deallocate() [2/2]

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

Definition at line 211 of file allocator.h.

## Friends And Related Symbol Documentation

## ◆ operator== [1/3]

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

Definition at line 230 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 251 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 251 of file allocator.h.

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

- allocator.h