Boost logo

Ublas :

From: Dominique Marcadet (Dominique.Marcadet_at_[hidden])
Date: 2005-01-06 09:56:48


>>I am using ublas::indirect_array <ublas::vector <size_t> > (for use with matrix_indirect) in a project.
>>It works with Boost 1.31.0, but not with Boost 1.32.0 because const_pointer is no more defined in ublas::vector (and pointer is privately defined).
>
>
>I just tried to create the above and it works on the CVS HEAD. Could you provide a test-case that fails ?

Here is one :

% cat test_indirect_array.cpp

#include <boost/numeric/ublas/vector.hpp>

using namespace boost::numeric::ublas;

int main()
{
    indirect_array <vector <size_t> > vi( 10 );
}

% c++ -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1671)

% c++ -c -Wno-long-double -fabi-version=0 -I../Boost-HEAD/boost test_indirect_array.cpp
../Boost-HEAD/boost/boost/numeric/ublas/storage.hpp: In instantiation of `boost::numeric::ublas::indirect_array<boost::numeric::ublas::vector<size_t, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> > > >':
test_indirect_array.cpp:8: instantiated from here
../Boost-HEAD/boost/boost/numeric/ublas/vector.hpp:34: error: `typedef const
   size_t*boost::numeric::ublas::vector<size_t,
   boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >
>::const_pointer' is private
../Boost-HEAD/boost/boost/numeric/ublas/storage.hpp:1225: error: within this
   context
../Boost-HEAD/boost/boost/numeric/ublas/vector.hpp:33: error: `typedef
   size_t*boost::numeric::ublas::vector<size_t,
   boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >
>::pointer' is private

>I also would say that I would not expect to use a vector as storage for an indirect_array, I think using an unbounded_array makes much more senses.

It works with unbounded_array, but I didn't thought about it when I wrote my code.

Thanks.
Dominique