Crashpad

Classes | Public Types | Public Member Functions | List of all members
crashpad::AlignedAllocator< T, Alignment > Struct Template Reference

A standard allocator that aligns its allocations as requested, suitable for use as an allocator in standard containers. More...

`#include "util/stdlib/aligned_allocator.h"`

## Classes
struct | rebind

## Public Types
using | value_type = T
using | pointer = T *
using | const_pointer = const T *
using | reference = T &
using | const_reference = const T &
using | size_type = size_t
using | difference_type = ptrdiff_t

## Public Member Functions
| AlignedAllocator (const AlignedAllocator &other) CRASHPAD_NOEXCEPT
template<typename U >
| AlignedAllocator (const AlignedAllocator< U, Alignment > &other) CRASHPAD_NOEXCEPT
pointer | address (reference x) const CRASHPAD_NOEXCEPT
const_pointer | address (const_reference x) const CRASHPAD_NOEXCEPT
pointer | allocate (size_type n, std::allocator< void >::const_pointer hint=0)
void | deallocate (pointer p, size_type n)
size_type | max_size () const CRASHPAD_NOEXCEPT
void | construct (pointer p, const T &val)
template<class U >
void | destroy (U *p)

## Detailed Description

### template<class T, size_t Alignment = ALIGNOF(T)>
struct crashpad::AlignedAllocator< T, Alignment >

A standard allocator that aligns its allocations as requested, suitable for use as an allocator in standard containers.

This is similar to `std::allocator<T>`, with the addition of an alignment guarantee. Alignment must be a power of 2. If Alignment is not specified, the default alignment for type T is used.

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

- util/stdlib/aligned_allocator.h