Re: [Boost-bugs] [Boost C++ Libraries] #5806: Property tree supporting custom allocators such as the boost pool ones

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5806: Property tree supporting custom allocators such as the boost pool ones
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-23 13:40:18


#5806: Property tree supporting custom allocators such as the boost pool ones
--------------------------------------+-------------------------------------
  Reporter: vivien.millet@… | Owner: kaalus
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: property_tree
   Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords: property tree custom allocator
--------------------------------------+-------------------------------------

Comment (by cornedbee):

 In STL containers, there is a container object which owns all the values
 inside. An STL container does not contain children of its own type.

 A PTree node contains children of its own type. You can obtain a reference
 to any subnode of the tree. There is no container that owns all nodes in
 the tree; instead every node owns its children, and the root is implicitly
 the node that isn't owned by any other. There are no up pointers in the
 tree.

 Because all nodes have the same type and no node can access its parent
 (and thus neither any other ancestor), there is no authoritative place to
 store a stateful allocator. This means that *every* node would need a copy
 or at least reference to a stateful allocator.

 As I said, supporting stateless allocators wouldn't be much trouble.
 (Still would be some trouble - PTree has a lot of template arguments as it
 is.) Still, with C++11 and its new allocators around the corner, I feel
 this is the worst time to add allocator support possible.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5806#comment:4>
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:07 UTC