18#ifndef INCLUDED_PS_ALLOCATORADAPTER
19#define INCLUDED_PS_ALLOCATORADAPTER
41template<
typename T,
typename Allocator>
54 template<
typename OtherT>
61 template<
typename OtherT>
66 return static_cast<T*
>(
m_Allocator->allocate(n *
sizeof(
T),
alignof(
T)));
71 m_Allocator->deallocate(
static_cast<void*
>(ptr), n *
sizeof(
T));
74 template<
typename OtherT>
Provides a way to use untyped allocators like LinearAllocator for containers.
Definition: AllocatorAdapter.h:43
Allocator * m_Allocator
Definition: AllocatorAdapter.h:84
constexpr AllocatorAdapter(const AllocatorAdapter< OtherT, Allocator > &allocatorAdapter) noexcept
Definition: AllocatorAdapter.h:62
constexpr void deallocate(T *ptr, std::size_t n)
Definition: AllocatorAdapter.h:69
std::true_type propagate_on_container_copy_assignment
Definition: AllocatorAdapter.h:49
constexpr AllocatorAdapter(Allocator &allocator) noexcept
Definition: AllocatorAdapter.h:60
std::true_type propagate_on_container_swap
Definition: AllocatorAdapter.h:51
std::false_type is_always_equal
Definition: AllocatorAdapter.h:52
constexpr bool operator==(const AllocatorAdapter< OtherT, Allocator > &other) const noexcept
Definition: AllocatorAdapter.h:75
T value_type
Definition: AllocatorAdapter.h:45
std::true_type propagate_on_container_move_assignment
Definition: AllocatorAdapter.h:50
constexpr T * allocate(std::size_t n)
Definition: AllocatorAdapter.h:64
Definition: AllocatorAdapter.h:26
#define T(string_literal)
Definition: secure_crt.cpp:81
Definition: AllocatorAdapter.h:56