NodePtr create_node_from_it(It it)
 {
    NodePtr p = this->allocate_one();
    Deallocator node_deallocator(p, this->node_alloc());
    ::boost::interprocess::construct_in_place(detail::get_pointer(p), it);
    node_deallocator.release();
    return (p);
 }
 NodePtr create_node()
 {
    NodePtr p = this->allocate_one();
    Deallocator node_deallocator(p, this->node_alloc());
    self_t::construct(p);
    node_deallocator.release();
    return (p);
 }
 NodePtr create_node(Args &&...args)
 {
    NodePtr p = this->allocate_one();
    Deallocator node_deallocator(p, this->node_alloc());
    self_t::construct(p, detail::forward_impl<Args>(args)...);
    node_deallocator.release();
    return (p);
 }
 Deallocator
 #else
 move_return<Deallocator>
 #endif
 create_node_and_deallocator()
 {
    NodePtr p = this->allocate_one();
    Deallocator node_deallocator(p, this->node_alloc());
    return node_deallocator;
 }
Exemple #5
0
 NodePtr create_node_from_it(const It &it)
 {
    NodePtr p = this->allocate_one();
    Deallocator node_deallocator(p, this->node_alloc());
    ::boost::container::construct_in_place(this->node_alloc(), container_detail::addressof(p->m_data), it);
    node_deallocator.release();
    //This does not throw
    typedef typename Node::hook_type hook_type;
    ::new(static_cast<hook_type*>(container_detail::to_raw_pointer(p)), boost_container_new_t()) hook_type;
    return (p);
 }
Exemple #6
0
 NodePtr create_node(Args &&...args)
 {
    NodePtr p = this->allocate_one();
    Deallocator node_deallocator(p, this->node_alloc());
    allocator_traits<NodeAlloc>::construct
       ( this->node_alloc()
       , container_detail::addressof(p->m_data), boost::forward<Args>(args)...);
    node_deallocator.release();
    //This does not throw
    typedef typename Node::hook_type hook_type;
    ::new(static_cast<hook_type*>(container_detail::to_raw_pointer(p)), boost_container_new_t()) hook_type;
    return (p);
 }