29#ifndef _MemorySTLAllocator_H__
30#define _MemorySTLAllocator_H__
115 template <
typename U>
120 template <
typename U,
typename P>
126 typename std::allocator<void>::const_pointer ptr = 0 )
140 AllocPolicy::deallocateBytes(ptr);
156 return AllocPolicy::getMaxAllocationSize();
159#if __cplusplus < 201103L
163 new(
static_cast<void*
>(
p))
T();
170 new(
static_cast<void*
>(
p))
T(val);
183 template<
typename T,
typename T2,
typename P>
193 template<
typename T,
typename P,
typename OtherAllocator>
201 template<
typename T,
typename T2,
typename P>
211 template<
typename T,
typename P,
typename OtherAllocator>
void construct(pointer p)
pointer allocate(size_type count, typename std::allocator< void >::const_pointer ptr=0)
memory allocation (elements, used by STL)
const value_type * const_pointer
STLAllocatorBase< T > Base
define our types, as per ISO C++
STLAllocator(STLAllocator< U, AllocPolicy > const &)
cast
pointer address(reference x) const
size_type max_size() const
const value_type & const_reference
virtual ~STLAllocator()
dtor
const_pointer address(const_reference x) const
STLAllocator(STLAllocator< U, P > const &)
cast
void construct(pointer p, const T &val)
Base::value_type value_type
std::ptrdiff_t difference_type
STLAllocator(STLAllocator const &)
copy ctor - done component wise
void deallocate(pointer ptr, size_type)
memory deallocation (elements, used by STL)
Reference-counted shared pointer, used for objects where implicit destruction is required.
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
Wrapper class for operating as an STL container allocator.
the standard rebind mechanism
STLAllocator< U, AllocPolicy > other