Re: [Boost-bugs] [Boost C++ Libraries] #6575: copy_remaining_to and copy_some_and_update don't use allocator_traits for construction

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6575: copy_remaining_to and copy_some_and_update don't use allocator_traits for construction
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-02-20 12:33:15


#6575: copy_remaining_to and copy_some_and_update don't use allocator_traits for
construction
-------------------------------------------------+--------------------------
  Reporter: Erik Jensen <Erik.Jensen@…> | Owner: igaztanaga
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: container
   Version: Boost 1.49.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------------------------+--------------------------

Comment (by igaztanaga):

 I think you've found a LWG issue here. We might end up calling two
 different functions if we call emplace_back(usually implemented via
 allocator_traits at the end of the buffer) or emplace(iterator, ...)
 (usually implemented via a temporary moved to the required position).

 I think you're proposal is the correct one, construct the temporary via
 allocator_traits: the programmer does not receive any surprising error
 with non-default constructible allocators, performance is optimum and the
 constructor to be called is always well-known by the programmer. Thanks
 again for the report.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6575#comment:5>
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:09 UTC