23#ifndef INCLUDED_STL_ALLOCATORS
24#define INCLUDED_STL_ALLOCATORS
33template<
typename T,
class Backend>
36 template<
typename A,
class B>
60 return static_cast<T*
>(
allocator->allocate(n *
sizeof(
T),
nullptr,
alignof(
T)));
65 return allocator->deallocate(
static_cast<void*
>(ptr), n *
sizeof(
T));
77template<
typename T,
class Backend>
80 template<
typename A,
class B>
104 return static_cast<T*
>(
allocator.allocate(n *
sizeof(
T),
nullptr,
alignof(
T)));
109 return allocator.deallocate(
static_cast<void*
>(ptr), n *
sizeof(
T));
Proxies allocation to another allocator.
Definition: STLAllocators.h:79
T value_type
Definition: STLAllocators.h:83
std::false_type is_always_equal
Definition: STLAllocators.h:85
T * pointer
Definition: STLAllocators.h:84
void deallocate(T *ptr, const size_t n)
Definition: STLAllocators.h:107
ProxyAllocator(const ProxyAllocator< V, Backend > &proxy)
Definition: STLAllocators.h:92
Backend & allocator
Definition: STLAllocators.h:113
ProxyAllocator(Backend &alloc)
Definition: STLAllocators.h:87
T * allocate(size_t n)
Definition: STLAllocators.h:102
Adapt a 0 A.D.
Definition: STLAllocators.h:35
void deallocate(T *ptr, const size_t n)
Definition: STLAllocators.h:63
T * pointer
Definition: STLAllocators.h:40
STLAllocator(const STLAllocator< V, Backend > &proxy)
Definition: STLAllocators.h:48
STLAllocator()
Definition: STLAllocators.h:43
std::false_type is_always_equal
Definition: STLAllocators.h:41
T value_type
Definition: STLAllocators.h:39
std::shared_ptr< Backend > allocator
Definition: STLAllocators.h:69
T * allocate(size_t n)
Definition: STLAllocators.h:58
Backend
Definition: Backend.h:28
Definition: ShaderDefines.cpp:31
#define T(string_literal)
Definition: secure_crt.cpp:77
Definition: STLAllocators.h:98
Definition: STLAllocators.h:54