|
tlx
|
#include <stack_allocator.hpp>
Classes | |
| struct | rebind |
| required rebind. More... | |
Public Types | |
| using | value_type = Type |
| using | pointer = Type * |
| using | const_pointer = const Type * |
| using | reference = Type & |
| using | const_reference = const Type & |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
| using | is_always_equal = std::false_type |
| C++11 type flag. More... | |
Public Types inherited from AllocatorBase< Type > | |
| using | value_type = Type |
| using | pointer = Type * |
| using | const_pointer = const Type * |
| using | reference = Type & |
| using | const_reference = const Type & |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
| using | is_always_equal = std::true_type |
| C++11 type flag. More... | |
| using | propagate_on_container_move_assignment = std::true_type |
| C++11 type flag. More... | |
Public Member Functions | |
| StackAllocator () noexcept | |
| default constructor to invalid arena More... | |
| StackAllocator (StackArena< Size > &arena) noexcept | |
| constructor with explicit arena reference More... | |
| template<typename Other > | |
| StackAllocator (const StackAllocator< Other, Size > &other) noexcept | |
| constructor from another allocator with same arena size More... | |
| StackAllocator (const StackAllocator &) noexcept=default | |
| copy-constructor: default More... | |
| StackAllocator & | operator= (const StackAllocator &) noexcept=default |
| copy-assignment: default More... | |
| StackAllocator (StackAllocator &&) noexcept=default | |
| move-constructor: default More... | |
| StackAllocator & | operator= (StackAllocator &&) noexcept=default |
| move-assignment: default More... | |
| pointer | allocate (size_t n) |
| allocate method: get memory from arena More... | |
| void | deallocate (pointer p, size_t n) noexcept |
| deallocate method: release from arena More... | |
| template<typename Other , size_t OtherSize> | |
| bool | operator== (const StackAllocator< Other, OtherSize > &other) const noexcept |
| template<typename Other , size_t OtherSize> | |
| bool | operator!= (const StackAllocator< Other, OtherSize > &other) const noexcept |
Public Member Functions inherited from AllocatorBase< Type > | |
| pointer | address (reference x) const noexcept |
| Returns the address of x. More... | |
| const_pointer | address (const_reference x) const noexcept |
| Returns the address of x. More... | |
| size_type | max_size () const noexcept |
| Maximum size possible to allocate. More... | |
| void | construct (pointer p, const_reference value) |
| Constructs an element object on the location pointed by p. More... | |
| void | destroy (pointer p) const noexcept |
| Destroys in-place the object pointed by p. More... | |
| template<typename SubType , typename... Args> | |
| void | construct (SubType *p, Args &&...args) |
| Constructs an element object on the location pointed by p. More... | |
| template<typename SubType > | |
| void | destroy (SubType *p) const noexcept |
| Destroys in-place the object pointed by p. More... | |
Private Attributes | |
| StackArena< Size > * | arena_ |
Friends | |
| template<typename Other , size_t OtherSize> | |
| class | StackAllocator |
Definition at line 114 of file stack_allocator.hpp.
| using const_pointer = const Type * |
Definition at line 119 of file stack_allocator.hpp.
| using const_reference = const Type& |
Definition at line 121 of file stack_allocator.hpp.
| using difference_type = std::ptrdiff_t |
Definition at line 123 of file stack_allocator.hpp.
| using is_always_equal = std::false_type |
C++11 type flag.
Definition at line 126 of file stack_allocator.hpp.
| using pointer = Type * |
Definition at line 118 of file stack_allocator.hpp.
| using reference = Type& |
Definition at line 120 of file stack_allocator.hpp.
| using size_type = std::size_t |
Definition at line 122 of file stack_allocator.hpp.
| using value_type = Type |
Definition at line 117 of file stack_allocator.hpp.
|
inlinenoexcept |
default constructor to invalid arena
Definition at line 133 of file stack_allocator.hpp.
|
inlineexplicitnoexcept |
constructor with explicit arena reference
Definition at line 136 of file stack_allocator.hpp.
|
inlinenoexcept |
constructor from another allocator with same arena size
Definition at line 141 of file stack_allocator.hpp.
|
defaultnoexcept |
copy-constructor: default
|
defaultnoexcept |
move-constructor: default
|
inline |
allocate method: get memory from arena
Definition at line 159 of file stack_allocator.hpp.
|
inlinenoexcept |
deallocate method: release from arena
Definition at line 164 of file stack_allocator.hpp.
|
inlinenoexcept |
Definition at line 175 of file stack_allocator.hpp.
|
defaultnoexcept |
copy-assignment: default
|
defaultnoexcept |
move-assignment: default
|
inlinenoexcept |
Definition at line 169 of file stack_allocator.hpp.
|
friend |
Definition at line 181 of file stack_allocator.hpp.
|
private |
Definition at line 184 of file stack_allocator.hpp.