2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-20 15:12:16 +00:00

add allocator_type

[SVN r25255]
This commit is contained in:
Michael Stevens
2004-09-20 07:37:47 +00:00
parent 37129a1478
commit 79f2836ee8

View File

@@ -80,6 +80,7 @@ namespace boost { namespace numeric { namespace ublas {
class unbounded_array:
public storage_array<unbounded_array<T, ALLOC> > {
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<bounded_array<T, N, ALLOC> > {
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;