Most members of std::allocate are deprecated in C++17

Replace them by their cousins from std::allocator_traits.

Signed-off-by: Daniela Engert <dani@ngrt.de>
This commit is contained in:
Daniela Engert 2017-12-31 09:50:23 +01:00
parent 8a8dee1357
commit 58c42a46c1
No known key found for this signature in database
GPG Key ID: 7B95EE52040C5975
12 changed files with 198 additions and 54 deletions

View File

@ -47,15 +47,31 @@ struct auto_space:private noncopyable
{ {
typedef typename boost::detail::allocator::rebind_to< typedef typename boost::detail::allocator::rebind_to<
Allocator,T Allocator,T
>::type::pointer pointer; >::type allocator;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename allocator::pointer pointer;
#else
typedef std::allocator_traits<allocator> traits;
typedef typename traits::pointer pointer;
#endif
explicit auto_space(const Allocator& al=Allocator(),std::size_t n=1): explicit auto_space(const Allocator& al=Allocator(),std::size_t n=1):
al_(al),n_(n),data_(n_?al_.allocate(n_):pointer(0)) al_(al),n_(n),
#ifdef BOOST_NO_CXX11_ALLOCATOR
data_(n_?al_.allocate(n_):pointer(0))
#else
data_(n_?traits::allocate(al_,n_):pointer(0))
#endif
{} {}
~auto_space() ~auto_space()
{ {
if(n_)al_.deallocate(data_,n_); if(n_)
#ifdef BOOST_NO_CXX11_ALLOCATOR
al_.deallocate(data_,n_);
#else
traits::deallocate(al_,data_,n_);
#endif
} }
Allocator get_allocator()const{return al_;} Allocator get_allocator()const{return al_;}
@ -70,10 +86,9 @@ struct auto_space:private noncopyable
} }
private: private:
typename boost::detail::allocator::rebind_to< allocator al_;
Allocator,T>::type al_; std::size_t n_;
std::size_t n_; pointer data_;
pointer data_;
}; };
template<typename T,typename Allocator> template<typename T,typename Allocator>

View File

@ -22,6 +22,7 @@
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <cstddef> #include <cstddef>
#include <functional> #include <functional>
#include <memory>
namespace boost{ namespace boost{
@ -84,7 +85,7 @@ public:
void clone(Node* node) void clone(Node* node)
{ {
(spc.data()+n)->first=node; (spc.data()+n)->first=node;
(spc.data()+n)->second=raw_ptr<Node*>(al_.allocate(1)); (spc.data()+n)->second=raw_ptr<Node*>(allocate());
BOOST_TRY{ BOOST_TRY{
boost::detail::allocator::construct( boost::detail::allocator::construct(
boost::addressof((spc.data()+n)->second->value()),node->value()); boost::addressof((spc.data()+n)->second->value()),node->value());
@ -119,7 +120,12 @@ private:
typedef typename boost::detail::allocator::rebind_to< typedef typename boost::detail::allocator::rebind_to<
Allocator,Node Allocator,Node
>::type allocator_type; >::type allocator_type;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename allocator_type::pointer allocator_pointer; typedef typename allocator_type::pointer allocator_pointer;
#else
typedef std::allocator_traits<allocator_type> allocator_traits;
typedef typename allocator_traits::pointer allocator_pointer;
#endif
allocator_type al_; allocator_type al_;
std::size_t size_; std::size_t size_;
@ -129,9 +135,22 @@ private:
Node* header_cpy_; Node* header_cpy_;
bool released; bool released;
allocator_pointer allocate()
{
#ifdef BOOST_NO_CXX11_ALLOCATOR
return al_.allocate(1);
#else
return allocator_traits::allocate(al_,1);
#endif
}
void deallocate(Node* node) void deallocate(Node* node)
{ {
#ifdef BOOST_NO_CXX11_ALLOCATOR
al_.deallocate(static_cast<allocator_pointer>(node),1); al_.deallocate(static_cast<allocator_pointer>(node),1);
#else
allocator_traits::deallocate(al_,static_cast<allocator_pointer>(node),1);
#endif
} }
}; };

View File

@ -17,6 +17,7 @@
#include <boost/detail/allocator_utilities.hpp> #include <boost/detail/allocator_utilities.hpp>
#include <boost/multi_index/detail/raw_ptr.hpp> #include <boost/multi_index/detail/raw_ptr.hpp>
#include <utility> #include <utility>
#include <memory>
namespace boost{ namespace boost{
@ -99,24 +100,34 @@ struct hashed_index_node_impl;
template<typename Allocator> template<typename Allocator>
struct hashed_index_base_node_impl struct hashed_index_base_node_impl
{ {
typedef typename
boost::detail::allocator::rebind_to<
Allocator,hashed_index_base_node_impl
>::type::pointer base_pointer;
typedef typename typedef typename
boost::detail::allocator::rebind_to< boost::detail::allocator::rebind_to<
Allocator,hashed_index_base_node_impl Allocator,hashed_index_base_node_impl
>::type::const_pointer const_base_pointer; >::type base_allocator;
typedef typename typedef typename
boost::detail::allocator::rebind_to< boost::detail::allocator::rebind_to<
Allocator, Allocator,
hashed_index_node_impl<Allocator> hashed_index_node_impl<Allocator>
>::type::pointer pointer; >::type node_allocator;
typedef typename #ifdef BOOST_NO_CXX11_ALLOCATOR
boost::detail::allocator::rebind_to< typedef typename base_allocator::pointer base_pointer;
Allocator, typedef typename base_allocator::const_pointer const_base_pointer;
hashed_index_node_impl<Allocator> typedef typename node_allocator::pointer pointer;
>::type::const_pointer const_pointer; typedef typename node_allocator::const_pointer const_pointer;
#else
typedef typename std::allocator_traits<
base_allocator
>::pointer base_pointer;
typedef typename std::allocator_traits<
base_allocator
>::const_pointer const_base_pointer;
typedef typename std::allocator_traits<
node_allocator
>::pointer pointer;
typedef typename std::allocator_traits<
node_allocator
>::const_pointer const_pointer;
#endif
pointer& prior(){return prior_;} pointer& prior(){return prior_;}
pointer prior()const{return prior_;} pointer prior()const{return prior_;}

View File

@ -69,6 +69,7 @@
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>
#include <boost/type_traits/is_same.hpp> #include <boost/type_traits/is_same.hpp>
#include <utility> #include <utility>
#include <memory>
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
#include <initializer_list> #include <initializer_list>
@ -162,8 +163,13 @@ public:
value_type,KeyFromValue,Compare> value_compare; value_type,KeyFromValue,Compare> value_compare;
typedef tuple<key_from_value,key_compare> ctor_args; typedef tuple<key_from_value,key_compare> ctor_args;
typedef typename super::final_allocator_type allocator_type; typedef typename super::final_allocator_type allocator_type;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename allocator_type::reference reference; typedef typename allocator_type::reference reference;
typedef typename allocator_type::const_reference const_reference; typedef typename allocator_type::const_reference const_reference;
#else
typedef value_type& reference;
typedef const value_type& const_reference;
#endif
#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE) #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
typedef safe_mode::safe_iterator< typedef safe_mode::safe_iterator<
@ -177,8 +183,14 @@ public:
typedef std::size_t size_type; typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type; typedef std::ptrdiff_t difference_type;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename allocator_type::pointer pointer; typedef typename allocator_type::pointer pointer;
typedef typename allocator_type::const_pointer const_pointer; typedef typename allocator_type::const_pointer const_pointer;
#else
typedef std::allocator_traits<allocator_type> allocator_traits;
typedef typename allocator_traits::pointer pointer;
typedef typename allocator_traits::const_pointer const_pointer;
#endif
typedef typename typedef typename
boost::reverse_iterator<iterator> reverse_iterator; boost::reverse_iterator<iterator> reverse_iterator;
typedef typename typedef typename

View File

@ -42,6 +42,7 @@
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
#include <cstddef> #include <cstddef>
#include <memory>
#include <boost/detail/allocator_utilities.hpp> #include <boost/detail/allocator_utilities.hpp>
#include <boost/multi_index/detail/raw_ptr.hpp> #include <boost/multi_index/detail/raw_ptr.hpp>
@ -68,20 +69,33 @@ template<typename AugmentPolicy,typename Allocator>
struct ordered_index_node_impl; /* fwd decl. */ struct ordered_index_node_impl; /* fwd decl. */
template<typename AugmentPolicy,typename Allocator> template<typename AugmentPolicy,typename Allocator>
struct ordered_index_node_std_base struct ordered_index_node_traits
{ {
typedef typename typedef typename
boost::detail::allocator::rebind_to< boost::detail::allocator::rebind_to<
Allocator, Allocator,
ordered_index_node_impl<AugmentPolicy,Allocator> ordered_index_node_impl<AugmentPolicy,Allocator>
>::type::pointer pointer; >::type allocator;
typedef typename #ifdef BOOST_NO_CXX11_ALLOCATOR
boost::detail::allocator::rebind_to< typedef typename allocator::pointer pointer;
Allocator, typedef typename allocator::const_pointer const_pointer;
ordered_index_node_impl<AugmentPolicy,Allocator> #else
>::type::const_pointer const_pointer; typedef std::allocator_traits<allocator> allocator_traits;
typedef ordered_index_color& color_ref; typedef typename allocator_traits::pointer pointer;
typedef pointer& parent_ref; typedef typename allocator_traits::const_pointer const_pointer;
#endif
};
template<typename AugmentPolicy,typename Allocator>
struct ordered_index_node_std_base
{
typedef ordered_index_node_traits<
AugmentPolicy,Allocator> node_traits;
typedef typename node_traits::allocator node_allocator;
typedef typename node_traits::pointer pointer;
typedef typename node_traits::const_pointer const_pointer;
typedef ordered_index_color& color_ref;
typedef pointer& parent_ref;
ordered_index_color& color(){return color_;} ordered_index_color& color(){return color_;}
ordered_index_color color()const{return color_;} ordered_index_color color()const{return color_;}
@ -217,10 +231,7 @@ struct ordered_index_node_impl_base:
ordered_index_node_compressed_base<AugmentPolicy,Allocator> ordered_index_node_compressed_base<AugmentPolicy,Allocator>
>::value%2)|| >::value%2)||
!(is_same< !(is_same<
typename boost::detail::allocator::rebind_to< typename ordered_index_node_traits<AugmentPolicy,Allocator>::pointer,
Allocator,
ordered_index_node_impl<AugmentPolicy,Allocator>
>::type::pointer,
ordered_index_node_impl<AugmentPolicy,Allocator>*>::value), ordered_index_node_impl<AugmentPolicy,Allocator>*>::value),
ordered_index_node_std_base<AugmentPolicy,Allocator>, ordered_index_node_std_base<AugmentPolicy,Allocator>,
ordered_index_node_compressed_base<AugmentPolicy,Allocator> ordered_index_node_compressed_base<AugmentPolicy,Allocator>

View File

@ -20,6 +20,7 @@
#include <boost/multi_index/detail/raw_ptr.hpp> #include <boost/multi_index/detail/raw_ptr.hpp>
#include <cstddef> #include <cstddef>
#include <functional> #include <functional>
#include <memory>
namespace boost{ namespace boost{
@ -33,16 +34,25 @@ struct random_access_index_node_impl
typedef typename typedef typename
boost::detail::allocator::rebind_to< boost::detail::allocator::rebind_to<
Allocator,random_access_index_node_impl Allocator,random_access_index_node_impl
>::type::pointer pointer; >::type node_allocator;
typedef typename #ifdef BOOST_NO_CXX11_ALLOCATOR
boost::detail::allocator::rebind_to< typedef typename node_allocator::pointer pointer;
Allocator,random_access_index_node_impl typedef typename node_allocator::const_pointer const_pointer;
>::type::const_pointer const_pointer; #else
typedef std::allocator_traits<node_allocator> node_traits;
typedef typename node_traits::pointer pointer;
typedef typename node_traits::const_pointer const_pointer;
#endif
typedef typename typedef typename
boost::detail::allocator::rebind_to< boost::detail::allocator::rebind_to<
Allocator,pointer Allocator,pointer
>::type::pointer ptr_pointer; >::type ptr_allocator;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename ptr_allocator::pointer ptr_pointer;
#else
typedef std::allocator_traits<ptr_allocator> ptr_traits;
typedef typename ptr_traits::pointer ptr_pointer;
#endif
ptr_pointer& up(){return up_;} ptr_pointer& up(){return up_;}
ptr_pointer up()const{return up_;} ptr_pointer up()const{return up_;}

View File

@ -20,6 +20,7 @@
#include <boost/multi_index/detail/rnd_index_node.hpp> #include <boost/multi_index/detail/rnd_index_node.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <cstddef> #include <cstddef>
#include <memory>
namespace boost{ namespace boost{
@ -43,7 +44,14 @@ public:
typedef typename node_impl_type::pointer value_type; typedef typename node_impl_type::pointer value_type;
typedef typename boost::detail::allocator::rebind_to< typedef typename boost::detail::allocator::rebind_to<
Allocator,value_type Allocator,value_type
>::type::pointer pointer; >::type value_allocator;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename value_allocator::pointer pointer;
#else
typedef typename std::allocator_traits<
value_allocator
>::pointer pointer;
#endif
random_access_index_ptr_array( random_access_index_ptr_array(
const Allocator& al,value_type end_,std::size_t sz): const Allocator& al,value_type end_,std::size_t sz):

View File

@ -15,6 +15,7 @@
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
#include <algorithm> #include <algorithm>
#include <memory>
#include <boost/detail/allocator_utilities.hpp> #include <boost/detail/allocator_utilities.hpp>
#include <boost/multi_index/detail/raw_ptr.hpp> #include <boost/multi_index/detail/raw_ptr.hpp>
@ -32,12 +33,15 @@ struct sequenced_index_node_impl
typedef typename typedef typename
boost::detail::allocator::rebind_to< boost::detail::allocator::rebind_to<
Allocator,sequenced_index_node_impl Allocator,sequenced_index_node_impl
>::type::pointer pointer; >::type node_allocator;
typedef typename #ifdef BOOST_NO_CXX11_ALLOCATOR
boost::detail::allocator::rebind_to< typedef typename node_allocator::pointer pointer;
Allocator,sequenced_index_node_impl typedef typename node_allocator::const_pointer const_pointer;
>::type::const_pointer const_pointer; #else
typedef std::allocator_traits<node_allocator> allocator_traits;
typedef typename allocator_traits::pointer pointer;
typedef typename allocator_traits::const_pointer const_pointer;
#endif
pointer& prior(){return prior_;} pointer& prior(){return prior_;}
pointer prior()const{return prior_;} pointer prior()const{return prior_;}
pointer& next(){return next_;} pointer& next(){return next_;}

View File

@ -45,6 +45,7 @@
#include <functional> #include <functional>
#include <iterator> #include <iterator>
#include <utility> #include <utility>
#include <memory>
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
#include <initializer_list> #include <initializer_list>
@ -127,10 +128,18 @@ public:
typedef tuple<std::size_t, typedef tuple<std::size_t,
key_from_value,hasher,key_equal> ctor_args; key_from_value,hasher,key_equal> ctor_args;
typedef typename super::final_allocator_type allocator_type; typedef typename super::final_allocator_type allocator_type;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename allocator_type::pointer pointer; typedef typename allocator_type::pointer pointer;
typedef typename allocator_type::const_pointer const_pointer; typedef typename allocator_type::const_pointer const_pointer;
typedef typename allocator_type::reference reference; typedef typename allocator_type::reference reference;
typedef typename allocator_type::const_reference const_reference; typedef typename allocator_type::const_reference const_reference;
#else
typedef std::allocator_traits<allocator_type> allocator_traits;
typedef typename allocator_traits::pointer pointer;
typedef typename allocator_traits::const_pointer const_pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
#endif
typedef std::size_t size_type; typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type; typedef std::ptrdiff_t difference_type;

View File

@ -45,6 +45,7 @@
#include <functional> #include <functional>
#include <stdexcept> #include <stdexcept>
#include <utility> #include <utility>
#include <memory>
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
#include<initializer_list> #include<initializer_list>
@ -114,8 +115,13 @@ public:
typedef typename node_type::value_type value_type; typedef typename node_type::value_type value_type;
typedef tuples::null_type ctor_args; typedef tuples::null_type ctor_args;
typedef typename super::final_allocator_type allocator_type; typedef typename super::final_allocator_type allocator_type;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename allocator_type::reference reference; typedef typename allocator_type::reference reference;
typedef typename allocator_type::const_reference const_reference; typedef typename allocator_type::const_reference const_reference;
#else
typedef value_type& reference;
typedef const value_type& const_reference;
#endif
#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE) #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
typedef safe_mode::safe_iterator< typedef safe_mode::safe_iterator<
@ -129,8 +135,14 @@ public:
typedef std::size_t size_type; typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type; typedef std::ptrdiff_t difference_type;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename allocator_type::pointer pointer; typedef typename allocator_type::pointer pointer;
typedef typename allocator_type::const_pointer const_pointer; typedef typename allocator_type::const_pointer const_pointer;
#else
typedef std::allocator_traits<allocator_type> allocator_traits;
typedef typename allocator_traits::pointer pointer;
typedef typename allocator_traits::const_pointer const_pointer;
#endif
typedef typename typedef typename
boost::reverse_iterator<iterator> reverse_iterator; boost::reverse_iterator<iterator> reverse_iterator;
typedef typename typedef typename

View File

@ -42,6 +42,7 @@
#include <cstddef> #include <cstddef>
#include <functional> #include <functional>
#include <utility> #include <utility>
#include <memory>
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
#include<initializer_list> #include<initializer_list>
@ -106,8 +107,13 @@ public:
typedef typename node_type::value_type value_type; typedef typename node_type::value_type value_type;
typedef tuples::null_type ctor_args; typedef tuples::null_type ctor_args;
typedef typename super::final_allocator_type allocator_type; typedef typename super::final_allocator_type allocator_type;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename allocator_type::reference reference; typedef typename allocator_type::reference reference;
typedef typename allocator_type::const_reference const_reference; typedef typename allocator_type::const_reference const_reference;
#else
typedef value_type& reference;
typedef const value_type& const_reference;
#endif
#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE) #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
typedef safe_mode::safe_iterator< typedef safe_mode::safe_iterator<
@ -121,8 +127,14 @@ public:
typedef std::size_t size_type; typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type; typedef std::ptrdiff_t difference_type;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename allocator_type::pointer pointer; typedef typename allocator_type::pointer pointer;
typedef typename allocator_type::const_pointer const_pointer; typedef typename allocator_type::const_pointer const_pointer;
#else
typedef std::allocator_traits<allocator_type> allocator_traits;
typedef typename allocator_traits::pointer pointer;
typedef typename allocator_traits::const_pointer const_pointer;
#endif
typedef typename typedef typename
boost::reverse_iterator<iterator> reverse_iterator; boost::reverse_iterator<iterator> reverse_iterator;
typedef typename typedef typename

View File

@ -17,6 +17,7 @@
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
#include <algorithm> #include <algorithm>
#include <memory>
#include <boost/core/addressof.hpp> #include <boost/core/addressof.hpp>
#include <boost/detail/allocator_utilities.hpp> #include <boost/detail/allocator_utilities.hpp>
#include <boost/detail/no_exceptions_support.hpp> #include <boost/detail/no_exceptions_support.hpp>
@ -90,11 +91,19 @@ class multi_index_container:
Value,IndexSpecifierList,Allocator>::type Value,IndexSpecifierList,Allocator>::type
>::type>, >::type>,
BOOST_MULTI_INDEX_PRIVATE_IF_MEMBER_TEMPLATE_FRIENDS detail::header_holder< BOOST_MULTI_INDEX_PRIVATE_IF_MEMBER_TEMPLATE_FRIENDS detail::header_holder<
typename boost::detail::allocator::rebind_to< #ifndef BOOST_NO_CXX11_ALLOCATOR
Allocator, typename std::allocator_traits<
typename detail::multi_index_node_type< #endif
Value,IndexSpecifierList,Allocator>::type typename boost::detail::allocator::rebind_to<
>::type::pointer, Allocator,
typename detail::multi_index_node_type<
Value,IndexSpecifierList,Allocator>::type
>::type
#ifdef BOOST_NO_CXX11_ALLOCATOR
::pointer,
#else
>::pointer,
#endif
multi_index_container<Value,IndexSpecifierList,Allocator> >, multi_index_container<Value,IndexSpecifierList,Allocator> >,
public detail::multi_index_base_type< public detail::multi_index_base_type<
Value,IndexSpecifierList,Allocator>::type Value,IndexSpecifierList,Allocator>::type
@ -125,13 +134,18 @@ private:
Allocator, Allocator,
typename super::node_type typename super::node_type
>::type node_allocator; >::type node_allocator;
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename node_allocator::pointer node_pointer;
#else
typedef std::allocator_traits<node_allocator> node_allocator_traits;
typedef typename node_allocator_traits::pointer node_pointer;
#endif
typedef ::boost::base_from_member< typedef ::boost::base_from_member<
node_allocator> bfm_allocator; node_allocator> bfm_allocator;
typedef detail::header_holder< typedef detail::header_holder<
typename node_allocator::pointer, node_pointer,
multi_index_container> bfm_header; multi_index_container> bfm_header;
public: public:
/* All types are inherited from super, a few are explicitly /* All types are inherited from super, a few are explicitly
* brought forward here to save us some typename's. * brought forward here to save us some typename's.
@ -528,13 +542,20 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
node_type* allocate_node() node_type* allocate_node()
{ {
#ifdef BOOST_NO_CXX11_ALLOCATOR
return &*bfm_allocator::member.allocate(1); return &*bfm_allocator::member.allocate(1);
#else
return &*node_allocator_traits::allocate(bfm_allocator::member,1);
#endif
} }
void deallocate_node(node_type* x) void deallocate_node(node_type* x)
{ {
typedef typename node_allocator::pointer node_pointer; #ifdef BOOST_NO_CXX11_ALLOCATOR
bfm_allocator::member.deallocate(static_cast<node_pointer>(x),1); bfm_allocator::member.deallocate(static_cast<node_pointer>(x),1);
#else
node_allocator_traits::deallocate(bfm_allocator::member,static_cast<node_pointer>(x),1);
#endif
} }
bool empty_()const bool empty_()const