7 #ifndef __MYGUI_CUSTOM_ALLOCATOR_H__
8 #define __MYGUI_CUSTOM_ALLOCATOR_H__
14 #include <OgrePrerequisites.h>
16 #if OGRE_VERSION < MYGUI_DEFINE_VERSION(1, 6, 0)
17 #include <OgreMemoryManager.h>
18 #include <OgreNoMemoryMacros.h>
56 inline const_pointer
address(const_reference r)
62 inline pointer
allocate(size_type cnt,
typename std::allocator<void>::const_pointer = 0)
64 return reinterpret_cast<pointer
>(::operator
new (cnt *
sizeof (T)));
68 ::operator
delete (p);
74 return (std::numeric_limits<size_type>::max)() /
sizeof(T);
99 #if OGRE_VERSION < MYGUI_DEFINE_VERSION(1, 6, 0)
100 #include <OgreMemoryMacros.h>
103 #endif // __MYGUI_CUSTOM_ALLOCATOR_H__
bool operator==(Allocator const &)
const value_type & const_reference
std::ptrdiff_t difference_type
bool operator!=(Allocator const &a)
Allocator(Allocator< U > const &)
size_type max_size() const
void deallocate(pointer p, size_type)
const_pointer address(const_reference r)
const value_type * const_pointer
pointer address(reference r)
pointer allocate(size_type cnt, typename std::allocator< void >::const_pointer=0)
void construct(pointer p, const T &t)