summaryrefslogtreecommitdiff
path: root/boost/heap/detail/stable_heap.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/heap/detail/stable_heap.hpp')
-rw-r--r--boost/heap/detail/stable_heap.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/boost/heap/detail/stable_heap.hpp b/boost/heap/detail/stable_heap.hpp
index 29efc48b50..b207ed39af 100644
--- a/boost/heap/detail/stable_heap.hpp
+++ b/boost/heap/detail/stable_heap.hpp
@@ -566,12 +566,22 @@ struct make_heap_base
template <typename Alloc>
struct extract_allocator_types
{
+#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename Alloc::size_type size_type;
typedef typename Alloc::difference_type difference_type;
typedef typename Alloc::reference reference;
typedef typename Alloc::const_reference const_reference;
typedef typename Alloc::pointer pointer;
typedef typename Alloc::const_pointer const_pointer;
+#else
+ typedef std::allocator_traits<Alloc> traits;
+ typedef typename traits::size_type size_type;
+ typedef typename traits::difference_type difference_type;
+ typedef typename Alloc::value_type& reference;
+ typedef typename Alloc::value_type const& const_reference;
+ typedef typename traits::pointer pointer;
+ typedef typename traits::const_pointer const_pointer;
+#endif
};