From 79f2836ee85dd13ded2401e8a9a3d00a42940d8c Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Mon, 20 Sep 2004 07:37:47 +0000 Subject: [PATCH] add allocator_type [SVN r25255] --- include/boost/numeric/ublas/storage.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index fe4e18a9..f59a0598 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -80,6 +80,7 @@ namespace boost { namespace numeric { namespace ublas { class unbounded_array: public storage_array > { public: + typedef ALLOC allocator_type; typedef typename ALLOC::size_type size_type; typedef typename ALLOC::difference_type difference_type; typedef T value_type; @@ -287,6 +288,11 @@ namespace boost { namespace numeric { namespace ublas { return reverse_iterator (begin ()); } + // Allocator + allocator_type get_allocator () { + return alloc_; + } + private: // Handle explict destroy on a (possibly indexed) iterator BOOST_UBLAS_INLINE @@ -303,6 +309,7 @@ namespace boost { namespace numeric { namespace ublas { class bounded_array: public storage_array > { public: + // No allocator_type as ALLOC is not used for allocation typedef typename ALLOC::size_type size_type; typedef typename ALLOC::difference_type difference_type; typedef T value_type;