Boost logo

Boost :

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


Andrey Semashev wrote:
> First, nice to see this submission, I've been missing and
> reimplementing this functionality from time to time.
>
> Second, you may see this:

Thanks! I'll extend the implementation and update the documentation
around aligned_alloc accordingly.

> One other note. I can see that aligned_allocator does not allow to
> specify the alignment. I assume it uses the type T alignment?

Yes, it uses the type T alignment.

> Can this class be extended so that I can specify the alignment
> explicitly in the template parameters?

Definitely. Instead of specifying the alignment value as a template
parameter, maybe a preferable design is:

    template<class T, template<class> class A = boost::alignment_of>
    class aligned_allocator;

...where 'A' could supply different alignment values for different
rebound types.

Glen


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