9 template <
typename T, std::
size_t Alignment>
28 return (static_cast<std::size_t>(0) - static_cast<std::size_t>(1)) /
sizeof(
T);
40 void*
const pv =
static_cast<void*
>(
p);
81 throw std::length_error(
"aligned_allocator<T>::allocate() - Integer overflow.");
85 void*
const pv = std::aligned_alloc(Alignment, n *
sizeof(
T));
89 throw std::bad_alloc();
92 return static_cast<T*
>(
pv);
95 void deallocate(
T*
const p,
const std::size_t
n)
const { std::free(p); }
void destroy(T *const p) const
T * allocate(const std::size_t n, const U *) const
const T * address(const T &s) const
aligned_allocator(const aligned_allocator &)
void deallocate(T *const p, const std::size_t n) const
bool operator!=(const aligned_allocator &other) const
ptrdiff_t difference_type
bool operator==(const aligned_allocator &other) const
void construct(T *const p, const T &t) const
aligned_allocator(const aligned_allocator< U, Alignment > &)
aligned_allocator & operator=(const aligned_allocator &)
void construct(T *const p)
aligned_allocator< U, Alignment > other
std::size_t max_size() const
T * allocate(const std::size_t n) const
const T & const_reference