10 #include <type_traits>
20 template <
typename T>
class StlAllocator :
public std::allocator<T>
23 using Base = std::allocator<T>;
45 using RawPointer =
typename std::allocator_traits<std::allocator<T>>::pointer;
54 #if _LIBCPP_STD_VER > 20
55 std::allocation_result<T *> allocate_at_least(
size_type n) {
return {
allocate(n), n}; }
std::size_t size_type
Definition: StlAllocator.h:38
Allocator * m_allocator
Definition: StlAllocator.h:64
StlAllocator< U > other
Definition: StlAllocator.h:42
typename std::allocator_traits< std::allocator< T >>::pointer RawPointer
Definition: StlAllocator.h:45
void deallocate(RawPointer p, size_type)
Definition: StlAllocator.h:58
aws_allocator Allocator
Definition: Allocator.h:14
~StlAllocator()
Definition: StlAllocator.h:36
Definition: StlAllocator.h:20
StlAllocator(const StlAllocator< U > &a) noexcept
Definition: StlAllocator.h:31
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition: Allocator.cpp:24
StlAllocator() noexcept
Definition: StlAllocator.h:25
Definition: StlAllocator.h:40
StlAllocator(Allocator *allocator) noexcept
Definition: StlAllocator.h:27
std::allocator< T > Base
Definition: StlAllocator.h:23
RawPointer allocate(size_type n, const void *hint=nullptr)
Definition: StlAllocator.h:47
Definition: Allocator.h:10
StlAllocator(const StlAllocator< T > &a) noexcept
Definition: StlAllocator.h:29