
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.