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 12:36:49


#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 vivien.millet@…):

 I don't get it :) how can it be penalizing if the user can choose it's own
 allocator through template instanciation like STL does, which can be
 either stateless or stateful ones (eventually providing a default one if
 user don't provide it) ?

 I've seen in the ptree_implementation.hpp somewhere in the constructors :

 : m_Children(new typename subs::base_container).

 Correct me if i'm wrong but is this couldn't be replaced by :

 m_Children = _Alloc::rebind<typename
 subs::base_container>::other::allocate();

 new (m_Children) typename subs::base_container;

 "_Alloc" being the template argument we add to

 basic_ptree<class K,class D,class Comp,class _Alloc =
 std::allocator<any_type_since_we_use_rebind>>

 regards.

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