Dynamic arena allocator.
More...
#include <memory.hpp>
|
|
using | value_type = std::allocator<void>::value_type |
| | Value type of the allocator.
|
|
using | size_type = std::allocator<void>::size_type |
| | Size type of the allocator.
|
|
using | difference_type = std::allocator<void>::difference_type |
| | Difference type of the allocator.
|
|
using | propagate_on_container_move_assignment = std::allocator<void>::propagate_on_container_move_assignment |
| | Whether the allocator can be propagated on container move assignment.
|
|
|
| arena_allocator () noexcept |
| | Default constructor.
|
|
constexpr | arena_allocator (const arena_allocator &) noexcept=delete |
| | Deleted copy constructor.
|
| | arena_allocator (arena_allocator &&other) noexcept |
| | Move constructor.
|
|
constexpr auto | operator= (const arena_allocator &) noexcept -> arena_allocator &=delete |
| | Deleted copy assignment operator.
|
| auto | operator= (arena_allocator &&other) noexcept -> arena_allocator & |
| | Move assignment operator.
|
|
| ~arena_allocator () noexcept |
| | Destructor.
|
| template<typename T> |
| constexpr auto | allocate () noexcept |
| | Returns uninitialized memory for type T.
|
| auto | operator== (const arena_allocator &other) const noexcept -> bool |
| | Comparison operator.
|
|
void | deallocate () noexcept |
| | Resets the arena.
|
◆ arena_allocator()
| stellarlib::ext::arena_allocator::arena_allocator |
( |
arena_allocator && | other | ) |
|
|
nodiscardnoexcept |
Move constructor.
- Parameters
-
◆ operator=()
Move assignment operator.
- Parameters
-
- Returns
- Current instance
◆ allocate()
template<typename T>
| auto stellarlib::ext::arena_allocator::allocate |
( |
| ) |
|
|
inlinenodiscardconstexprnoexcept |
Returns uninitialized memory for type T.
- Template Parameters
-
| T | Type to determine alignment and size |
- Returns
- Uninitialized memory for type T
◆ operator==()
| auto stellarlib::ext::arena_allocator::operator== |
( |
const arena_allocator & | other | ) |
const -> bool |
|
nodiscardnoexcept |
Comparison operator.
- Parameters
-
- Returns
- Result of the comparison
The documentation for this class was generated from the following file: