Implementation of std::allocator<void> More...


Classes | |
| struct | rebind |
| Its member type other is the equivalent allocator type to allocate elements of type T More... | |
Public Types | |
| typedef void | value_type |
| Type is hard coded to void. | |
| typedef void * | pointer |
| Pointer to nothing. | |
| typedef const void * | const_pointer |
| Const pointer to nothing. | |
| typedef uintptr_t | size_type |
| Quantities of elements. | |
| typedef intptr_t | difference_type |
| Difference between pointers. | |
| typedef void & | reference |
| Reference to element. | |
| typedef const void & | const_reference |
| Reference to constant element. | |
| typedef true_type | propagate_on_container_move_assignment |
| Propagate on move assignment. | |
| typedef true_type | propagate_on_container_copy_assignment |
| Copy the allocator when copy assigned. | |
| typedef true_type | propagate_on_container_swap |
| Swap allocators on swap assignment. | |
| typedef true_type | is_always_equal |
| This allocator matches any other allocator type. | |
Public Member Functions | |
| constexpr | allocator () noexcept=default |
| Default constructor. | |
| ~allocator ()=default | |
| Default destructor. | |
| allocator & | operator= (allocator &&) noexcept=default |
| Assignment move constructor. | |
| pointer | address (reference x) noexcept |
| Returns the address of x. | |
| void * | allocate (uintptr_t n) noexcept |
| Allocate memory for n chunks of data. | |
| void | deallocate (pointer p, size_type) noexcept |
| Free memory allocated. | |
| uintptr_t | max_size () const noexcept |
| Maximum size possible to allocate. | |
| void | construct (pointer p) |
| Default constructs an object. | |
| void | destroy (pointer p) |
| Destroys the contents of an object. | |
Implementation of std::allocator<void>
Special type of allocator that has no ability to allocate or free any memory.
| typedef const void* Burger::allocator< void >::const_pointer |
Const pointer to nothing.
| typedef const void& Burger::allocator< void >::const_reference |
Reference to constant element.
| typedef intptr_t Burger::allocator< void >::difference_type |
Difference between pointers.
| typedef true_type Burger::allocator< void >::is_always_equal |
This allocator matches any other allocator type.
| typedef void* Burger::allocator< void >::pointer |
Pointer to nothing.
| typedef true_type Burger::allocator< void >::propagate_on_container_copy_assignment |
Copy the allocator when copy assigned.
| typedef true_type Burger::allocator< void >::propagate_on_container_move_assignment |
Propagate on move assignment.
| typedef true_type Burger::allocator< void >::propagate_on_container_swap |
Swap allocators on swap assignment.
| typedef void& Burger::allocator< void >::reference |
Reference to element.
| typedef uintptr_t Burger::allocator< void >::size_type |
Quantities of elements.
| typedef void Burger::allocator< void >::value_type |
Type is hard coded to void.
|
constexprdefaultnoexcept |
Default constructor.
|
default |
Default destructor.
|
inlinenoexcept |
Returns the address of x.
|
inlinenoexcept |
Allocate memory for n chunks of data.
| n | Number of elements to allocate |
|
inline |
Default constructs an object.
|
inlinenoexcept |
Free memory allocated.
| p | Pointer to memory to release |
|
inline |
Destroys the contents of an object.
|
inlinenoexcept |
Maximum size possible to allocate.
Returns the maximum number of elements, each of member type value_type (an alias of allocator's template parameter) that could potentially be allocated by a call to member allocate.
|
defaultnoexcept |
Assignment move constructor.