forked from boostorg/container
Fix move constructors with unequal allocators and move/copy assignment of tree.
This commit is contained in:
@@ -370,7 +370,7 @@ struct node_alloc_holder
|
||||
protected:
|
||||
struct cloner
|
||||
{
|
||||
cloner(node_alloc_holder &holder)
|
||||
explicit cloner(node_alloc_holder &holder)
|
||||
: m_holder(holder)
|
||||
{}
|
||||
|
||||
@@ -380,6 +380,18 @@ struct node_alloc_holder
|
||||
node_alloc_holder &m_holder;
|
||||
};
|
||||
|
||||
struct move_cloner
|
||||
{
|
||||
move_cloner(node_alloc_holder &holder)
|
||||
: m_holder(holder)
|
||||
{}
|
||||
|
||||
NodePtr operator()(Node &other)
|
||||
{ return m_holder.create_node(::boost::move(other.get_data())); }
|
||||
|
||||
node_alloc_holder &m_holder;
|
||||
};
|
||||
|
||||
struct members_holder
|
||||
: public NodeAlloc
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user