#include <customstlallocator.h>
Custom STL C++11 allocator that wraps maxon::DefaultAllocator.
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 = std::size_t |
using | difference_type = std::ptrdiff_t |
Public Member Functions | |
CustomSTLAllocator () noexcept | |
CustomSTLAllocator (const CustomSTLAllocator &) noexcept | |
template<typename U > | |
CustomSTLAllocator (const CustomSTLAllocator< U > &) noexcept | |
T * | allocate (std::size_t n) noexcept |
void | deallocate (T *p, std::size_t) noexcept |
void | construct (T *p, const T &value) |
void | destroy (T *p) |
using value_type = T |
type definitions required for custom allocator
using pointer = T* |
using const_pointer = const T* |
using reference = T& |
using const_reference = const T& |
using size_type = std::size_t |
using difference_type = std::ptrdiff_t |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Allocates storage for n values of T.
|
noexcept |
Deallocates storage obtained by a call to allocate().
void construct | ( | T * | p, |
const T & | value | ||
) |
Constructs an object of type T at the location of p, using the value of value in the call to the constructor for T.
void destroy | ( | T * | p | ) |
Calls the destructor on the value pointed to by p.