Subject: Re: [boost] Review request for Boost.Align
From: Peter Dimov (lists_at_[hidden])
Date: 2014-02-21 07:24:05
Glen Fernandes wrote:
> Updated the source, documentation, tests, examples.
> Source: https://github.com/glenfe/align
> Doc: http://glenfe.com/align/doc/
I think that 'alignment' should be checked:
BOOST_ASSERT( alignment & (alignment - 1 ) == 0 );
as the implementation does already assume that it's a power of 2.
I don't think that "the value of alignment shall be a valid alignment
supported by the implementation" is a valid requirement for us. The standard
uses such language because it's not an implementation, but we are the
implementation, so we must say what alignments we support.
The aligned_ptr example doesn't seem to call ~T.
It might be a good idea to document that using aligned_allocator with a
minimum alignment is generally only suitable for vector and there may be
surprises if such an allocator is passed to a node-based container.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk