|
FE 0.9.2
Header-only C++ frontend library
|
An allocator in order to use this Arena for containers. More...
#include <fe/arena.h>
Public Types | |
| using | value_type = T |
Public Member Functions | |
| Allocator ()=delete | |
| template<class U> | |
| constexpr | Allocator (const Arena::Allocator< U > &allocator) noexcept |
| constexpr | Allocator (Arena &arena) noexcept |
| constexpr T * | allocate (size_t num_elems) |
| constexpr void | deallocate (T *, size_t) noexcept |
| template<class U> | |
| constexpr bool | operator== (const Allocator< U > &) const noexcept |
| All Arena::Allocators compare equal. | |
| template<class U> | |
| constexpr bool | operator!= (const Allocator< U > &) const noexcept |
Public Attributes | |
| Arena & | arena |
An allocator in order to use this Arena for containers.
Construct it via Arena::allocator.
| using fe::Arena::Allocator< T >::value_type = T |
|
delete |
Referenced by operator!=(), and operator==().
|
inlineconstexprnoexcept |
Definition at line 55 of file arena.h.
References fe::Arena::allocator().
|
inlineconstexprnoexcept |
Definition at line 57 of file arena.h.
References fe::Arena::Arena(), and arena.
|
inlinenodiscardconstexpr |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Definition at line 70 of file arena.h.
References Allocator().
|
inlineconstexprnoexcept |
All Arena::Allocators compare equal.
Allocator equality denotes deallocation-compatibility, and Arena::Allocator::deallocate is a no-op, so storage from any instance can be "freed" through any other. This also keeps allocator-aware container swap (e.g. in SymPool::swap) well-defined without requiring propagate_on_container_swap, which we cannot enable here because arena is a non-rebindable reference.
Definition at line 69 of file arena.h.
References Allocator().
| Arena& fe::Arena::Allocator< T >::arena |
Definition at line 72 of file arena.h.
Referenced by allocate(), and Allocator().