|
fennec
|
Allocator implementation, uses new and delete operators.
More...
#include <allocator.h>
Public Types | |
| using | value_t = T |
| Alias for the data type used for metaprogramming. | |
| template<typename R > | |
| using | rebind = allocator< R > |
| Metaprogramming utility to rebind an allocator to a different data type. | |
Public Member Functions | |
| constexpr | allocator ()=default |
| Default Constructor. | |
| constexpr | ~allocator ()=default |
| Default Destructor. | |
| constexpr | allocator (const allocator &)=default |
| Copy Constructor. | |
| constexpr allocator & | operator= (const allocator &)=default |
| Copy Assignment. | |
| constexpr bool_t | operator== (const allocator &) |
| Equality operator. | |
| constexpr bool_t | operator!= (const allocator &) |
| Inequality operator. | |
| template<typename U > | |
| constexpr bool_t | operator== (const allocator< U > &) |
| Equality operator for allocators of same type but with different data type. | |
| template<typename U > | |
| constexpr bool_t | operator!= (const allocator< U > &) |
| Inequality operator for allocators of same type but with different data type. | |
| constexpr T * | allocate (size_t n) |
Allocate a block of memory large enough to hold n elements of type T | |
| constexpr T * | allocate (size_t n, align_t align) |
Allocate a block of memory large enough to hold n elements of type T | |
| constexpr void | deallocate (T *ptr) |
Deallocate a block of memory with type T | |
| constexpr void | deallocate (T *ptr, align_t align) |
Deallocate a block of memory with type T | |