diff --git a/include/boost/numeric/ublas/storage_sparse.hpp b/include/boost/numeric/ublas/storage_sparse.hpp index 1c5bab41..30c069a3 100644 --- a/include/boost/numeric/ublas/storage_sparse.hpp +++ b/include/boost/numeric/ublas/storage_sparse.hpp @@ -254,6 +254,7 @@ namespace boost { namespace numeric { namespace ublas { template class map_array { public: + typedef ALLOC allocator_type; typedef typename ALLOC::size_type size_type; typedef typename ALLOC::difference_type difference_type; typedef std::pair value_type; @@ -549,6 +550,11 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator (begin ()); } + // Allocator + allocator_type get_allocator () { + return alloc_; + } + private: // Provide destroy as a non member function BOOST_UBLAS_INLINE @@ -561,6 +567,7 @@ namespace boost { namespace numeric { namespace ublas { size_type size_; }; + namespace detail { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template @@ -618,6 +625,7 @@ namespace boost { namespace numeric { namespace ublas { template class set_array { public: + typedef ALLOC allocator_type; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef I index_type; @@ -862,6 +870,11 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator (begin ()); } + // Allocator + allocator_type get_allocator () { + return alloc_; + } + private: size_type capacity_; pointer data_;