diff --git a/include/boost/container/allocator_traits.hpp b/include/boost/container/allocator_traits.hpp index a85831f..728a7ce 100644 --- a/include/boost/container/allocator_traits.hpp +++ b/include/boost/container/allocator_traits.hpp @@ -24,11 +24,12 @@ #include #include #include -#include -#include #include #include #include + +#include +#include #include #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) @@ -57,6 +58,18 @@ template struct is_std_allocator< std::allocator > { static const bool value = true; }; +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_pointer) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(void_pointer) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_void_pointer) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_swap) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type) + } //namespace container_detail { #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -295,7 +308,7 @@ struct allocator_traits { return a.allocate(n, p); } static pointer priv_allocate(container_detail::false_type, Alloc &a, size_type n, const_void_pointer) - { return allocator_traits::allocate(a, n); } + { return a.allocate(n); } template static void priv_destroy(container_detail::true_type, Alloc &a, T* p) BOOST_CONTAINER_NOEXCEPT diff --git a/include/boost/container/detail/memory_util.hpp b/include/boost/container/detail/memory_util.hpp index 34e931b..16d03cd 100644 --- a/include/boost/container/detail/memory_util.hpp +++ b/include/boost/container/detail/memory_util.hpp @@ -57,28 +57,6 @@ #endif #include BOOST_PP_ITERATE() -namespace boost { -namespace container { -namespace container_detail { - -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(void_pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_void_pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_swap) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_compare) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(predicate_type) - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - #include #endif // ! defined(BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP) diff --git a/include/boost/container/detail/node_alloc_holder.hpp b/include/boost/container/detail/node_alloc_holder.hpp index c4c6c50..50441e9 100644 --- a/include/boost/container/detail/node_alloc_holder.hpp +++ b/include/boost/container/detail/node_alloc_holder.hpp @@ -31,8 +31,9 @@ #include #include #include -#include #include + +#include #include #ifndef BOOST_CONTAINER_PERFECT_FORWARDING @@ -42,11 +43,13 @@ #include - namespace boost { namespace container { namespace container_detail { +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_compare) +BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(predicate_type) + template struct node_alloc_holder { diff --git a/include/boost/container/detail/utilities.hpp b/include/boost/container/detail/utilities.hpp index fc56350..d6a6d2e 100644 --- a/include/boost/container/detail/utilities.hpp +++ b/include/boost/container/detail/utilities.hpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -116,14 +117,7 @@ struct next_capacity_calculator } }; -template -inline T* to_raw_pointer(T* p) -{ return p; } - -template -inline typename boost::intrusive::pointer_traits::element_type* - to_raw_pointer(const Pointer &p) -{ return boost::container::container_detail::to_raw_pointer(p.operator->()); } +using ::boost::intrusive::detail::to_raw_pointer; template inline T* iterator_to_pointer(T* i) diff --git a/test/null_iterators_test.cpp b/test/null_iterators_test.cpp index 7bf4b81..59d1d89 100644 --- a/test/null_iterators_test.cpp +++ b/test/null_iterators_test.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include