Boost logo

Boost :

Subject: Re: [boost] Review request for Boost.Align
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2014-02-21 00:17:22


Updated the source, documentation, tests, examples.

Source: https://github.com/glenfe/align
Doc: http://glenfe.com/align/doc/

1. aligned_alloc isn't confined to sizeof(void*) multiples for posix_memalign
2. aligned_alloc supports _aligned_malloc and posix_memalign on more platforms
3. aligned_allocator now allows specifying minimum alignment
    template<class T, size_t minimum_alignment = 1> class aligned_allocator;
4. Documentation improvements

Bjorn Reese wrote:
> Why are there no allocator_traits?

In what way? std::allocator_traits is usable with
boost::aligned_allocator, just as it is with std::allocator.
Concerning the interface of boost::aligned_allocator, it provides the
same type traits as the specification of std::allocator in 20.6.9
[default.allocator].

> Should there be support for placement new?

What do you suggest? The result of boost::aligned_alloc (or the result
of boost::align), given the appropriate alignment, is suitable for use
with placement new. We could provide additional utilities that do both
allocation and construction.

Thanks!

Glen


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk