Boost logo

Boost Users :

From: Grant Goodyear (grant_at_[hidden])
Date: 2005-01-10 12:44:48

I'm currently working on a numerical project that uses boost.python, and
since we already had boost as a dependency we've begun using
boost/multi_array_ref to simplify multi-dimensional array handling in
our code. I was rather surprised when the following code fragment spit
out pages of errors when I tried to compile it:

float* data = (float*) malloc(nx*ny*sizeof(float));
boost::multi_array_ref<float, 2>
    xy(data, boost::extents[nx][ny]);
xy = 0.; // errors out here

Looking through the docs I realized that operator= isn't even mentioned,
so perhaps I shouldn't have been surprised. It is rather unfortunate,
though, that such a statement isn't allowed. (Unless, of course, I'm
doing something wrong, which is completely possible.) Is there any
plan to add such functionality in the future, or would it make more
sense for us to switch to a different library (blitz++ or something

Grant Goodyear

Grant Goodyear		
e-mail: grant_at_[hidden]	

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at