![]() |
Jolt Physics
A multi core friendly Game Physics Engine
|
STL allocator that forwards to our allocation functions. More...
#include <STLAllocator.h>
Classes | |
| struct | rebind |
| Converting to allocator for other type. More... | |
Public Types | |
| using | value_type = T |
| using | pointer = T * |
| Pointer to type. More... | |
| using | const_pointer = const T * |
| using | reference = T & |
| using | const_reference = const T & |
| using | size_type = size_t |
| using | difference_type = ptrdiff_t |
| using | is_always_equal = std::true_type |
| The allocator is stateless. More... | |
| using | propagate_on_container_move_assignment = std::true_type |
| Allocator supports moving. More... | |
Public Member Functions | |
| STLAllocator ()=default | |
| Constructor. More... | |
| template<typename T2 > | |
| STLAllocator (const STLAllocator< T2 > &) | |
| Constructor from other allocator. More... | |
| pointer | allocate (size_type inN) |
| Allocate memory. More... | |
| template<bool has_reallocate_v = has_reallocate, typename = std::enable_if_t<has_reallocate_v>> | |
| pointer | reallocate (pointer inOldPointer, size_type inOldSize, size_type inNewSize) |
| Reallocate memory. More... | |
| void | deallocate (pointer inPointer, size_type) |
| Free memory. More... | |
| bool | operator== (const STLAllocator< T > &) const |
| Allocators are stateless so assumed to be equal. More... | |
| bool | operator!= (const STLAllocator< T > &) const |
Static Public Attributes | |
| static constexpr bool | needs_aligned_allocate = alignof(T) > (JPH_CPU_ADDRESS_BITS == 32? 8 : 16) |
| If this allocator needs to fall back to aligned allocations because the type requires it. More... | |
| static constexpr bool | has_reallocate = std::is_trivially_copyable<T>() && !needs_aligned_allocate |
| Should we expose a reallocate function? More... | |
STL allocator that forwards to our allocation functions.
| using STLAllocator< T >::const_pointer = const T * |
| using STLAllocator< T >::const_reference = const T & |
| using STLAllocator< T >::difference_type = ptrdiff_t |
| using STLAllocator< T >::is_always_equal = std::true_type |
The allocator is stateless.
| using STLAllocator< T >::pointer = T * |
Pointer to type.
| using STLAllocator< T >::propagate_on_container_move_assignment = std::true_type |
Allocator supports moving.
| using STLAllocator< T >::reference = T & |
Reference to type. Can be removed in C++20.
| using STLAllocator< T >::size_type = size_t |
| using STLAllocator< T >::value_type = T |
|
inlinedefault |
Constructor.
|
inline |
Constructor from other allocator.
|
inline |
Allocate memory.
|
inline |
Free memory.
|
inline |
|
inline |
Allocators are stateless so assumed to be equal.
|
inline |
Reallocate memory.
|
staticconstexpr |
Should we expose a reallocate function?
|
staticconstexpr |
If this allocator needs to fall back to aligned allocations because the type requires it.