Thrill
0.1
|
Definition at line 114 of file stack_allocator.hpp.
#include <stack_allocator.hpp>
Classes | |
struct | rebind |
required rebind. More... | |
Public Types | |
using | const_pointer = const Type * |
using | const_reference = const Type & |
using | difference_type = std::ptrdiff_t |
using | is_always_equal = std::false_type |
C++11 type flag. More... | |
using | pointer = Type * |
using | reference = Type & |
using | size_type = std::size_t |
using | value_type = Type |
Public Types inherited from AllocatorBase< Type > | |
using | const_pointer = const Type * |
using | const_reference = const Type & |
using | difference_type = std::ptrdiff_t |
using | is_always_equal = std::true_type |
C++11 type flag. More... | |
using | pointer = Type * |
using | propagate_on_container_move_assignment = std::true_type |
C++11 type flag. More... | |
using | reference = Type & |
using | size_type = std::size_t |
using | value_type = Type |
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 (StackAllocator &&) noexcept=default | |
move-constructor: 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 |
StackAllocator & | operator= (const StackAllocator &) noexcept=default |
copy-assignment: default More... | |
StackAllocator & | operator= (StackAllocator &&) noexcept=default |
move-assignment: default More... | |
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... | |
void | construct (pointer p, const_reference value) |
Constructs an element object on the location 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... | |
void | destroy (pointer p) const noexcept |
Destroys in-place the object pointed by p. More... | |
template<typename SubType > | |
void | destroy (SubType *p) const noexcept |
Destroys in-place the object pointed by p. More... | |
size_type | max_size () const noexcept |
Maximum size possible to allocate. More... | |
Private Attributes | |
StackArena< Size > * | arena_ |
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.
References StackArena< Size >::operator=().
|
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.
References StackAllocator< Type, Size >::deallocate(), and StackArena< Size >::AlignmentHelper::p.
Referenced by StackAllocator< Type, Size >::deallocate().
|
inlinenoexcept |
Definition at line 175 of file stack_allocator.hpp.
References tlx::operator==().
|
defaultnoexcept |
copy-assignment: default
|
defaultnoexcept |
move-assignment: default
|
inlinenoexcept |
Definition at line 169 of file stack_allocator.hpp.
References StackAllocator< Type, Size >::arena_.
|
private |
Definition at line 184 of file stack_allocator.hpp.
Referenced by StackAllocator< Type, Size >::operator==().