14 #ifndef STXXL_COMMON_NEW_ALLOC_HEADER
15 #define STXXL_COMMON_NEW_ALLOC_HEADER
27 template <
typename T,
typename U>
35 template <
typename T,
typename U>
37 typedef std::allocator<U>
other;
78 operator std::allocator<U>()
80 static std::allocator<U> helper_allocator;
81 return helper_allocator;
93 return static_cast<T*
>(T::operator
new (num *
sizeof(T)));
102 ::new ((
void*)p)T(value);
105 #ifdef __GXX_EXPERIMENTAL_CXX0X__
106 template <
typename ... Args>
107 void construct(pointer p, Args&& ... args)
109 ::new ((
void*)p)T(std::forward<Args>(args) ...);
123 T::operator
delete (p);
128 template <
class T1,
class T2>
135 template <
class T1,
class T2>
144 #endif // !STXXL_COMMON_NEW_ALLOC_HEADER
new_alloc_rebind< T, U >::other other
size_type max_size() const
void construct(pointer p, const T &value)
pointer address(reference value) const
const T & const_reference
void deallocate(pointer p, size_type)
const_pointer address(const_reference value) const
bool operator!=(const uint_pair &b) const
inequality checking operator
std::ptrdiff_t difference_type
#define STXXL_BEGIN_NAMESPACE
new_alloc(const new_alloc< U > &)
pointer allocate(size_type num, const void *=0)
static uint_pair max()
return an uint_pair instance containing the largest value possible
new_alloc(const new_alloc &)
std::allocator< U > other
bool operator==(const uint_pair &b) const
equality checking operator
#define STXXL_END_NAMESPACE