[align] [review] Pre-review comments

AMDG
I saw the announcement of the review and decided
to take a look at the library today.
All the following is based on:
commit 0d361143c18254efddacfd48775a2776ca7d5e11
Author: Glen Fernandes

On Fri, Mar 28, 2014 at 9:33 PM, Steven Watanabe
I saw the announcement of the review and decided to take a look at the library today.
Steven, thank you! I've made changes to the documentation, source, and tests based on your feedback. Commit: 01eed9a222 Regarding the non-explicit constructor: I made it explicit after your review; I had originally made it non-explicit for similarity with the interface of scoped_allocator_adaptor. Regarding the support for C++11 allocators whose 'pointer' type is a smart pointer: While aligned_allocator_adaptor exposes only raw pointers, it should be well-defined with allocators who expose smart pointers (it would keep the smart pointer object alive post allocate (in the bytes preceding the pointer returned) until deallocate. I updated the wording in the documentation to better convey this. Source: https://github.com/glenfe/align Documentation: http://glenfe.github.io/align Again, very grateful for the early review. Glen

Glen Fernandes wrote:
Steven, thank you!
I've made changes to the documentation, source, and tests based on your feedback. Commit: 01eed9a222
I don't agree with the change in aligned_alloc requirements that would undefine its behavior when 'alignment' is not a fundamental or an extended alignment value. There are cases in which one needs memory aligned at values that are not specific to the C++ implementation but come from hardware or the OS, determined at runtime, such as the page size, cache line size, sector size.

On Sun, Mar 30, 2014 at 1:46 AM, Peter Dimov
I don't agree with the change in aligned_alloc requirements that would undefine its behavior when 'alignment' is not a fundamental or an extended alignment value. There are cases in which one needs memory aligned at values that are not specific to the C++ implementation but come from hardware or the OS, determined at runtime, such as the page size, cache line size, sector size.
Makes sense. Even the C11 specification for its aligned_alloc() doesn't require that alignment's value be a fundamental or extended alignment. Ideally align() could also have the same relaxed requirements but C++11 specifies otherwise. Glen

Glen Fernandes wrote:
Ideally align() could also have the same relaxed requirements but C++11 specifies otherwise.

On Mon, Mar 31, 2014 at 2:38 PM, Peter Dimov wrote:
Ah; nice. :)
participants (3)
-
Glen Fernandes
-
Peter Dimov
-
Steven Watanabe