Re: [Boost-bugs] [Boost C++ Libraries] #11312: smart_ptr::detail::as_allocator::allocate() adds alignment padding when it's not needed

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11312: smart_ptr::detail::as_allocator::allocate() adds alignment padding when it's not needed
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-05-17 16:30:07


#11312: smart_ptr::detail::as_allocator::allocate() adds alignment padding when
it's not needed
----------------------------------+-----------------------
  Reporter: David Aue <david@…> | Owner: glenfe
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: smart_ptr
   Version: Boost 1.57.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------+-----------------------

Comment (by glenfe):

 Good point. The above math was under the assumption that for any
 `value_type` the `allocate()` function for any given allocator would yield
 memory that is at least `alignof(std::max_align_t)` bytes aligned.

 It doesn't seem right to make this assumption, and nothing in
 **[allocator.requirements]** provides such a guarantee anyway, so I'll
 update the implementation accordingly.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11312#comment:8>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC