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

allocator_type

[SVN r25253]
This commit is contained in:
Michael Stevens
2004-09-20 07:37:03 +00:00
parent 20655d38d3
commit 37129a1478

View File

@@ -254,6 +254,7 @@ namespace boost { namespace numeric { namespace ublas {
template<class I, class T, class ALLOC>
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<I,T> 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<class A, class T>
@@ -618,6 +625,7 @@ namespace boost { namespace numeric { namespace ublas {
template<class I, class ALLOC>
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_;