9#ifndef JPH_DISABLE_CUSTOM_ALLOCATOR
34 template <
typename T2>
40 if constexpr (
alignof(T) > (JPH_CPU_ADDRESS_BITS == 32? 8 : 16))
49 if constexpr (
alignof(T) > (JPH_CPU_ADDRESS_BITS == 32? 8 : 16))
67 template <
typename T2>
76template <
typename T>
using STLAllocator = std::allocator<T>;
81template <
class T>
using Array = std::vector<T, STLAllocator<T>>;
87#if (!defined(JPH_PLATFORM_WINDOWS) || defined(JPH_COMPILER_MINGW)) && !defined(JPH_DISABLE_CUSTOM_ALLOCATOR)
95 inline size_t operator () (
const JPH::String &inRHS)
const
97 return hash<string_view> { } (inRHS);
#define JPH_NAMESPACE_END
Definition: Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:361
AllocateFunction Allocate
Definition: Memory.cpp:59
FreeFunction Free
Definition: Memory.cpp:60
AlignedFreeFunction AlignedFree
Definition: Memory.cpp:62
AlignedAllocateFunction AlignedAllocate
Definition: Memory.cpp:61
std::basic_string< char, std::char_traits< char >, STLAllocator< char > > String
Definition: STLAllocator.h:82
std::vector< T, STLAllocator< T > > Array
Definition: STLAllocator.h:81
std::basic_istringstream< char, std::char_traits< char >, STLAllocator< char > > IStringStream
Definition: STLAllocator.h:83
STL allocator that forwards to our allocation functions.
Definition: STLAllocator.h:14
STLAllocator()=default
Constructor.
pointer allocate(size_type inN)
Allocate memory.
Definition: STLAllocator.h:38
T * pointer
Pointer to type.
Definition: STLAllocator.h:19
const T & const_reference
Definition: STLAllocator.h:25
bool operator==(const STLAllocator< T > &) const
Allocators are stateless so assumed to be equal.
Definition: STLAllocator.h:56
bool operator!=(const STLAllocator< T > &) const
Definition: STLAllocator.h:61
T value_type
Definition: STLAllocator.h:16
void deallocate(pointer inPointer, size_type)
Free memory.
Definition: STLAllocator.h:47
size_t size_type
Definition: STLAllocator.h:27
STLAllocator(const STLAllocator< T2 > &)
Constructor from other allocator.
Definition: STLAllocator.h:35
ptrdiff_t difference_type
Definition: STLAllocator.h:28
const T * const_pointer
Definition: STLAllocator.h:20
T & reference
Definition: STLAllocator.h:24
Definition: Reference.h:204
Converting to allocator for other type.
Definition: STLAllocator.h:69