Re: [Boost-bugs] [Boost C++ Libraries] #6606: Map: rbtree_node doesn't use allocator_traits to construct m_data

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6606: Map: rbtree_node doesn't use allocator_traits to construct m_data
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-22 19:26:08


#6606: Map: rbtree_node doesn't use allocator_traits to construct m_data
-------------------------------------------------+--------------------------
  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 Erik Jensen <Erik.Jensen@…>):

 One further note:

 I was reading through the standard, and came across this (§23.2.1¶3):

 For the components affected by this subclause that declare an
 '''`allocator_type`''', objects stored in these components shall be
 constructed using the '''`allocator_traits<allocator_type>::construct`'''
 function and destroyed using the
 '''`allocator_traits<allocator_type>::destroy`''' function (20.6.8.2).
 These functions are called only for the container’s element type, not for
 internal types used by the container. [ ''Note:'' This means, for example,
 that a node-based container might need to construct nodes containing
 aligned buffers and call construct to place the element into the buffer.
 ''—end note'' ]

 My understanding, then, is that while `construct` should be called for the
 pair, it should not be called for `rbtree_node` (which it currently is).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6606#comment:2>
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